Skip to content

Fix critical error transaction handling in sqlite-backed DOs#4934

Merged
jclee merged 7 commits intomainfrom
jlee/fix-sqlite-critical-error-transaction
Sep 2, 2025
Merged

Fix critical error transaction handling in sqlite-backed DOs#4934
jclee merged 7 commits intomainfrom
jlee/fix-sqlite-critical-error-transaction

Conversation

@jclee
Copy link
Copy Markdown
Contributor

@jclee jclee commented Aug 28, 2025

When sqlite encounters certain "critical errors" during a transaction (like when the db exceeds available storage), it may automatically roll back the transaction. We already have code that attempts to handle rollbacks due to critical errors, but it interacts poorly with the savepoint-based explicit transactions set up by .transaction() and .transactionSync(), triggering "no such savepoint" internal errors when it attempts to commit or roll back a savepoint that had already been removed. This PR updates the handling to suppress failures due to missing savepoints after critical errors.

It also addresses an edge case where a critical error during an explicit .transaction() did not propagate a broken exception to the caller.

jclee added 3 commits August 28, 2025 16:12
...to make it easier to use similar code for other tests
Using node assertion functions, and also adding checks for in-progress implicit
transaction rollbacks.
@jclee jclee requested review from justin-mp and kentonv August 28, 2025 23:55
@jclee jclee marked this pull request as ready for review August 28, 2025 23:55
@jclee jclee requested review from a team as code owners August 28, 2025 23:55
@jclee jclee force-pushed the jlee/fix-sqlite-critical-error-transaction branch from 9848409 to e526428 Compare September 2, 2025 18:04
@jclee jclee merged commit deb03a0 into main Sep 2, 2025
21 of 22 checks passed
@jclee jclee deleted the jlee/fix-sqlite-critical-error-transaction branch September 2, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants