Skip to content

Commit 447b5c3

Browse files
committed
tapdb: add SQLITE_BUSY_SNAPSHOT err code to re-tryable errors
During a trace run we noticed that sometimes there's a conflict in transactions that return the (517) SQLITE_BUSY_SNAPSHOT error code. See https://www.sqlite.org/rescode.html#busy_snapshot. We add this error to the list of re-tryable errors so the database transaction re-try mechanism will simply try again.
1 parent 8182ac3 commit 447b5c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tapdb/sqlerrors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func parseSqliteError(sqliteErr *sqlite.Error) error {
5555

5656
// A write operation could not continue because of a conflict within the
5757
// same database connection.
58-
case sqlite3.SQLITE_LOCKED:
58+
case sqlite3.SQLITE_LOCKED, sqlite3.SQLITE_BUSY_SNAPSHOT:
5959
return &ErrDeadlockError{
6060
DbError: sqliteErr,
6161
}

0 commit comments

Comments
 (0)