From 13e8409a977922de33c6c701533fb7485449bba5 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Tue, 3 Dec 2024 20:36:29 +0800 Subject: [PATCH] Lightning: add retry if transaction failed while fetching task metas (#55670) (#57917) close pingcap/tidb#53042 --- br/pkg/lightning/common/retry.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/br/pkg/lightning/common/retry.go b/br/pkg/lightning/common/retry.go index 8fba7eadc9a67..f46e881d6d55c 100644 --- a/br/pkg/lightning/common/retry.go +++ b/br/pkg/lightning/common/retry.go @@ -126,7 +126,8 @@ func isSingleRetryableError(err error) bool { case *mysql.MySQLError: switch nerr.Number { // ErrLockDeadlock can retry to commit while meet deadlock - case tmysql.ErrUnknown, tmysql.ErrLockDeadlock, tmysql.ErrWriteConflict, tmysql.ErrWriteConflictInTiDB, + case tmysql.ErrUnknown, tmysql.ErrLockDeadlock, tmysql.ErrLockWaitTimeout, tmysql.ErrWriteConflict, + tmysql.ErrWriteConflictInTiDB, tmysql.ErrPDServerTimeout, tmysql.ErrTiKVServerTimeout, tmysql.ErrTiKVServerBusy, tmysql.ErrResolveLockTimeout, tmysql.ErrRegionUnavailable, tmysql.ErrInfoSchemaExpired, tmysql.ErrInfoSchemaChanged, tmysql.ErrTxnRetryable: return true