Skip to content

Commit

Permalink
fix: retry when conflict
Browse files Browse the repository at this point in the history
Signed-off-by: jiefenghuang <[email protected]>
  • Loading branch information
jiefenghuang committed Dec 26, 2024
1 parent 52625b4 commit 4304d4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/meta/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ func (m *dbMeta) shouldRetry(err error) bool {
case "mysql":
// MySQL, MariaDB or TiDB
return strings.Contains(msg, "try restarting transaction") || strings.Contains(msg, "try again later") ||
strings.Contains(msg, "duplicate entry")
strings.Contains(msg, "duplicate entry") || strings.Contains(msg, "Error 1020 (HY000)")
case "postgres":
return strings.Contains(msg, "current transaction is aborted") || strings.Contains(msg, "deadlock detected") ||
strings.Contains(msg, "duplicate key value") || strings.Contains(msg, "could not serialize access") ||
Expand Down

0 comments on commit 4304d4d

Please sign in to comment.