You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4291616
Browse filesBrowse the repository at this point in the historyBrowse files
fix(core): retry sqlite lock timeouts only outside transactions
#47567's retryLocked wraps every LockTimeoutError, but a held DEFERRED WAL
transaction whose read snapshot has been invalidated by another connection's
commit returns SQLITE_BUSY_SNAPSHOT on the next write — retrying the same
statement will keep failing the same way until a rollback + restart of the
whole transaction, so the 30 s budget only delays the inevitable. Only
retry in autocommit; inside an explicit transaction surface the error
immediately so the caller can decide.
Bun's bun:sqlite Database exposes inTransaction; node:sqlite's DatabaseSync
exposes isTransaction. Each driver captures its native handle in the make
closure and consults the right property in the retry's `while` predicate.
0 commit comments