From 1b33d77f971e86392f057fa9ffcfdb480a661300 Mon Sep 17 00:00:00 2001 From: 3pointer Date: Thu, 12 Oct 2023 16:46:44 +0800 Subject: [PATCH] br: retry import sst files on invalidPart error --- br/pkg/utils/retry.go | 1 + br/tests/br_full/run.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/br/pkg/utils/retry.go b/br/pkg/utils/retry.go index b4ab0437cf651..b417e07ff1ce9 100644 --- a/br/pkg/utils/retry.go +++ b/br/pkg/utils/retry.go @@ -29,6 +29,7 @@ var retryableServerError = []string{ "internalerror", "not read from or written to within the timeout period", "requesttimeout", + "invalidpart", } // RetryableFunc presents a retryable operation. diff --git a/br/tests/br_full/run.sh b/br/tests/br_full/run.sh index e1325a8d4812e..78b28d51f8f4e 100755 --- a/br/tests/br_full/run.sh +++ b/br/tests/br_full/run.sh @@ -53,7 +53,7 @@ test_log="${TEST_DIR}/${DB}_test.log" error_str="not read from or written to within the timeout period" unset BR_LOG_TO_TERM -export GO_FAILPOINTS="github.com/pingcap/tidb/br/pkg/backup/backup-storage-error=1*return(\"connection refused\")->1*return(\"InternalError\");github.com/pingcap/tidb/br/pkg/backup/backup-timeout-error=1*return(\"RequestTimeout\")->1*return(\"not read from or written to within the timeout period\")" +export GO_FAILPOINTS="github.com/pingcap/tidb/br/pkg/backup/backup-storage-error=1*return(\"connection refused\")->1*return(\"InternalError\");github.com/pingcap/tidb/br/pkg/backup/backup-timeout-error=1*return(\"RequestTimeout\")->1*return(\"not read from or written to within the timeout period\")->1*return(\"InvalidPart\")"" run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB-lz4" --concurrency 4 --compression lz4 --log-file $test_log export GO_FAILPOINTS="" size_lz4=$(du -d 0 $TEST_DIR/$DB-lz4 | awk '{print $1}')