Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#41759
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
  • Loading branch information
kennytm authored and ti-chi-bot committed Mar 15, 2023
1 parent 36a9810 commit 10e9b14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions br/pkg/utils/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ var retryableServerError = []string{
"body write aborted",
"error during dispatch",
"put object timeout",
<<<<<<< HEAD
=======
"internalerror",
"not read from or written to within the timeout period",
"<code>requesttimeout</code>",
>>>>>>> 7b5c65f108f (br: add <Code>RequestTimeout</Code> to list of retryable errors (#41759))
}

// RetryableFunc presents a retryable operation.
Expand Down
9 changes: 9 additions & 0 deletions br/tests/br_full/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,17 @@ fi

# backup full
echo "backup with lz4 start..."
<<<<<<< HEAD
export GO_FAILPOINTS="github.com/pingcap/tidb/br/pkg/backup/backup-storage-error=1*return(\"connection refused\")"
run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB-lz4" --concurrency 4 --compression lz4
=======
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(\"<Code>RequestTimeout</Code>\")->1*return(\"not read from or written to within the timeout period\")"
run_br --pd $PD_ADDR backup full -s "local://$TEST_DIR/$DB-lz4" --concurrency 4 --compression lz4 --log-file $test_log
>>>>>>> 7b5c65f108f (br: add <Code>RequestTimeout</Code> to list of retryable errors (#41759))
export GO_FAILPOINTS=""
size_lz4=$(du -d 0 $TEST_DIR/$DB-lz4 | awk '{print $1}')

Expand Down

0 comments on commit 10e9b14

Please sign in to comment.