Repository navigation
feat(sqlite-embedded): commit sqlite transactions locally and flush them in the background - #5882
eersnington wants to merge 3 commits into
Conversation
|
This PR was not deployed automatically as @eersnington does not have access to the Railway project. In order to get automatic PR deploys, please add @eersnington to your workspace on Railway. |
Review: deferred SQLite commit modeI read the core of this change: the Questions and possible bugs
Style and cleanup
TestsThe coverage in
ConventionsThe code follows the repo's rules: |
7261035 to
1d1d6c8
Compare
1d1d6c8 to
64ca955
Compare
|
The changes look good on static review; no high-confidence findings. No issues found. Checked for bugs and CLAUDE.md compliance; no Validation limits: build/tests could not run because Copy prompt to fix all |
7a32f03 to
08d0868
Compare
08d0868 to
4cf6492
Compare
1c4989b to
bbf29d5
Compare
…hem in the background
…ay wait A command from a blocking caller was refused whenever any other command was queued or running on the database. A synchronous COMMIT then failed as writer_busy behind a command that cannot wait, such as an uncork that only waits for the open transaction to end. The ROLLBACK after it was refused the same way, and the transaction coordinator closed the database. Such a command is now refused only while a statement, or an uncork that will commit, is queued or running, since either may wait for storage or the network. A ROLLBACK is never refused: it cannot wait for storage.
bbf29d5 to
fd3cb91
Compare
…the engine socket The socket writer always took the storage queue before the HTTP queue. Deferred commits keep that queue full while the engine reads slower than a busy node writes, so every HTTP response waited until storage traffic stopped. At 16,000 deferred actors the reply to a start action took up to 64 s after the action ran, and starts finished only once the write window closed. Pongs still go first. When both queues hold a frame the writer now alternates between them, so a response waits behind at most one storage frame and storage still gets every other write.
commit_seqreturns the latest local commit.wait_for_flush(seq)resolves when that commit is durable.rivetkit-coreopens databases in awaited mode and reports failures throughwait_for_failure, so this PR compiles by itself.Rebased onto main; fixed fork-start durability under deferred commits.
Stack: #5882 (this PR), #5883, #5911.