feat(sqlite): add deferred commit mode with flush sequencing - #5676
Draft
NathanFlurry wants to merge 1 commit into
Draft
feat(sqlite): add deferred commit mode with flush sequencing#5676NathanFlurry wants to merge 1 commit into
NathanFlurry wants to merge 1 commit into
Conversation
|
🚅 Deployed to the actors-pr-5676 environment in rivet-frontend
|
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.
Stacked on #5659 (
sync-sqlite). Opt-indeferredSQLite commit mode: a commit returns after updating actor-local page state, a background flusher ships pages to the engine in order, and callers wait on a monotonic flush sequence. This is the storage-layer primitive for Durable Object style output gates. Design:docs-internal/engine/sqlite/deferred-commits/SPEC.md.CommitMode::Deferredto the native SQLite VFS: committed pages land in a pinned overlay, a single flusher batches and ships them in order with the existing head fence, andcommitSeq/flushedSeq/waitForFlushexpose durability with snapshot semantics.sqliteCommitModeactor config,SqliteDbsequence accessors, a database failure channel, sync-call fail-fast on JavaScript-owned transaction leases, and SQLite auto-rollback detection in the transaction coordinator.db({ commitMode }),commitSeq(),flushedSeq(),waitForFlush(),flushError(),executeSyncRaw()withreadonly, and a handle-formbeginTransactionSync()in the TypeScript client, Drizzle wrapper, NAPI bindings, and runtime interfaces; WebAssembly and remote SQLite reject the mode at actor start.action.bind(...)is not dispatched as a nested remote action, and unlink the Actor Runtime Socket before joining its listener so a destroyed generation cannot expose its socket path.Awaited mode is unchanged. The five
fault::*compaction tests inrivet-depot-clientfail identically on the base branch (in-process engine pubsub "invalid version: 0") and are unrelated.