dumpling: compress supports snappy/zstd#38910
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
Is this PR ready for review now? |
there are still 2 tests failing and I am trying to fix them |
|
/cc @lichunzhu @lance6716 |
dumpling/export/config.go
Outdated
| return storage.Gzip, nil | ||
| case "snappy": | ||
| return storage.Snappy, nil | ||
| case "zst": |
There was a problem hiding this comment.
Do you mean this? It's different with the description in comment
| case "zst": | |
| case "zstd": |
or maybe
| case "zst": | |
| case "zstd","zst": |
dumpling/tests/s3/run.sh
Outdated
| # test snappy | ||
| run_dumpling --s3.endpoint="http://$S3_ENDPOINT/" --compress "snappy" | ||
|
|
||
| bin/mc cp minio/mybucket/dump-compress/s3-schema-create.sql.snappy "${HOST_DIR}/compress/s3-schema-create.sql.snappy" | ||
| bin/mc cp minio/mybucket/dump-compress/s3.t-schema.sql.snappy "${HOST_DIR}/compress/s3.t-schema.sql.snappy" | ||
| bin/mc cp minio/mybucket/dump-compress/s3.t.000000000.sql.snappy "${HOST_DIR}/compress/s3.t.000000000.sql.snappy" | ||
|
|
||
| snappy -d "${HOST_DIR}/compress/s3-schema-create.sql.snappy" | ||
| diff "${HOST_DIR}/local/s3-schema-create.sql" "${HOST_DIR}/compress/s3-schema-create.sql" | ||
|
|
||
| snappy -d "${HOST_DIR}/compress/s3.t-schema.sql.snappy" | ||
| diff "${HOST_DIR}/local/s3.t-schema.sql" "${HOST_DIR}/compress/s3.t-schema.sql" | ||
|
|
||
| snappy -d "${HOST_DIR}/compress/s3.t.000000000.sql.snappy" | ||
| diff "${HOST_DIR}/local/s3.t.000000000.sql" "${HOST_DIR}/compress/s3.t.000000000.sql" | ||
|
|
||
| rm "${HOST_DIR}/compress/s3-schema-create.sql" | ||
| rm "${HOST_DIR}/compress/s3.t-schema.sql" | ||
| rm "${HOST_DIR}/compress/s3.t.000000000.sql" | ||
|
|
||
| # test zstd | ||
| run_dumpling --s3.endpoint="http://$S3_ENDPOINT/" --compress "zst" | ||
|
|
||
| bin/mc cp minio/mybucket/dump-compress/s3-schema-create.sql.zst "${HOST_DIR}/compress/s3-schema-create.sql.zst" | ||
| bin/mc cp minio/mybucket/dump-compress/s3.t-schema.sql.zst "${HOST_DIR}/compress/s3.t-schema.sql.zst" | ||
| bin/mc cp minio/mybucket/dump-compress/s3.t.000000000.sql.zst "${HOST_DIR}/compress/s3.t.000000000.sql.zst" | ||
|
|
||
| zstd "${HOST_DIR}/compress/s3-schema-create.sql.zst" -d | ||
| diff "${HOST_DIR}/local/s3-schema-create.sql" "${HOST_DIR}/compress/s3-schema-create.sql" | ||
|
|
||
| zstd "${HOST_DIR}/compress/s3.t-schema.sql.zst" -d | ||
| diff "${HOST_DIR}/local/s3.t-schema.sql" "${HOST_DIR}/compress/s3.t-schema.sql" | ||
|
|
||
| zstd "${HOST_DIR}/compress/s3.t.000000000.sql.zst" -d | ||
| diff "${HOST_DIR}/local/s3.t.000000000.sql" "${HOST_DIR}/compress/s3.t.000000000.sql" |
There was a problem hiding this comment.
Can we merge these three parts in a for loop?
|
/run-all-tests |
|
/merge |
|
@lance6716: DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
will review later |
| wget https://dl.minio.io/client/mc/release/linux-amd64/mc -O bin/mc | ||
| chmod a+x bin/mc | ||
|
|
||
| go get github.com/ma6174/snappy |
There was a problem hiding this comment.
| go get github.com/ma6174/snappy |
only need go install?
There was a problem hiding this comment.
error encountered in CI integration test
https://github.com/pingcap/tidb/actions/runs/3444134903/jobs/5746413416#step:6:7138
i think maybe should add back go get github.com/ma6174/snappy?
dumpling/tests/s3/run.sh
Outdated
|
|
||
| case $compressType in | ||
| "gzip") | ||
| gzip "${HOST_DIR}/compress/s3-schema-create.sql.gz" -d |
There was a problem hiding this comment.
seems we can assign gzip, snappy, zst to $binary, and also assign $suffix, then use
${binary} "${HOST_DIR}/compress/s3-schema-create.sql.${suffix}" -d
diff "${HOST_DIR}/local/s3-schema-create.sql" "${HOST_DIR}/compress/s3-schema-create.sql"
${binary} "${HOST_DIR}/compress/s3.t-schema.sql.${suffix}" -d
diff "${HOST_DIR}/local/s3.t-schema.sql" "${HOST_DIR}/compress/s3.t-schema.sql"
${binary} "${HOST_DIR}/compress/s3.t.000000000.sql.${suffix}" -d
diff "${HOST_DIR}/local/s3.t.000000000.sql" "${HOST_DIR}/compress/s3.t.000000000.sql"|
/run-all-tests |
3 similar comments
|
/run-all-tests |
|
/run-all-tests |
|
/run-all-tests |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 5ba6b50 |
TiDB MergeCI notify🔴 Bad News! New failing [3] after this pr merged.
|
What problem does this PR solve?
Issue Number: ref #38514
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.