Repository navigation
Recover pooled connections after failed transaction completion - #100
Open
virtanAnton wants to merge 1 commit into
Open
virtanAnton wants to merge 1 commit into
virtanAnton wants to merge 1 commit into
Conversation
virtanAnton
force-pushed
the
7.4/bug/RT-15704-recover-failed-transaction
branch
2 times, most recently
from
November 3, 2026 12:22
0255651 to
f4c32b2
Compare
virtanAnton
marked this pull request as ready for review
November 3, 2026 12:22
virtanAnton
force-pushed
the
7.4/bug/RT-15704-recover-failed-transaction
branch
from
November 3, 2026 12:29
f4c32b2 to
99d230e
Compare
virtanAnton
marked this pull request as draft
November 3, 2026 17:00
virtanAnton
force-pushed
the
7.4/bug/RT-15704-recover-failed-transaction
branch
from
November 3, 2026 17:13
99d230e to
bf4a7d8
Compare
virtanAnton
marked this pull request as ready for review
November 3, 2026 17:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A failed outermost COMMIT can leave a native transaction open after the managed session releases its connection to the pool. A deferred foreign-key violation, for example, can then expose rows from the failed transaction to a later operation.
Check SQLite's autocommit state while the session still owns the connection, and roll back an active transaction without inheriting cancellation. If the state cannot be verified or cleanup leaves the transaction active, fail the entire pool closed and require the owner to close and reopen the database. Discarding and silently replacing a connection could otherwise lose an in-memory database, attached databases, temporary objects, or other connection-local state. Preserve the original transaction-end failure and attach cleanup failures as suppressed exceptions.
Reject reentrant completion of the outer transaction before changing its success state, and release assigned or queued waiters safely if the pool becomes unusable. Raw transaction SQL via
rawExecSQLis outside the managed transaction recovery contract.Validation on an Android API 36 arm64 emulator:
verification/native-commit-cancellation/README.md.Cancellation is cooperative, and a short COMMIT can complete before a progress callback runs. A failed COMMIT does not establish whether its changes were durable. Coverage is limited to the tested Android version and architecture.
Fixes #101