Repository navigation
Restore SQLite transaction serialization with separate CDC snapshot readers - #650
Merged
Merged
Conversation
skhaz
approved these changes
Sep 5, 2026
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.
PR #351 widened file-backed SQLite application pools from one connection to the configured width (unlimited by default). This changed transaction semantics even without CDC: deferred transactions could read a WAL snapshot, race another writer, and fail when upgrading to a write. The rqlite driver already has a five-second busy timeout; that does not resolve
SQLITE_BUSY_SNAPSHOT.Restore one application connection, held for the whole transaction, as before #351. Give file-backed CDC snapshots a separate, lazily opened read-only pool with one connection. Its connector belongs to the same pool generation, carries no mutation hooks, and closes with the observer. Snapshot admission acquires the reader before the commit fence, preserving snapshot-to-live ordering without consuming the application writer. Private in-memory databases retain their existing single-connection path.
Validation:
sqlite_preupdate_hookunder the race detector; SQLite CDC suite and full lint pass.kickside/kickside@0.1.131with fresh databases. The baseline failed in Keeper reconciliation withEdge insert failed: database is locked. The fix completes all 8 bootloaders and 96 reconciliation batches (9,515 commands, 2,956 entries, zero failures); the homepage responds HTTP 200.The existing overflow test now waits for asynchronous overflow processing before receiving from its stream; receiving immediately could itself free capacity and invalidate the test's expectation.