Repository navigation
Conversation
…e lock Batches and force-included mutations committed to Postgres while holding the speculative-state lock, so submit, watch, and the next batch waited on the commit. Both now commit after the lock is released. Commits still run one at a time in execution order: each waits for the previous one. Restart resumes after the highest committed execution index, so a later commit must not land before an earlier one. A batch enters the submit queue when it executes, so simulate always sees the newest journals. Submit waits for the commits it covers after simulating, outside the lock, and before it broadcasts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kyscott18
force-pushed
the
perf/pipelined-persist
branch
from
October 26, 2026 19:48
aca1f79 to
bbec4cb
Compare
Collaborator
Author
|
Superseded: the persist-fiber work is moving to a new branch off main. |
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.
Summary
Accepted mutations committed to Postgres while holding the speculative-state lock, so
submit, watch, and the next batch waited on the commit. Batches and force-included mutations now commit after the lock is released.acceptedBatchesQueuewhen it executes, sosimulatealways sees the newest journals.submitwaits for the commits it covers after simulating, outside the lock, and before it broadcasts. Nothing settles onchain before it is committed.TypewriterStoppedError.This lowers latency for work that contends on the lock. It does not raise throughput: the batch loop still runs execute → commit serially.
Test plan
bun run typecheck,bun run test(packages/typewriter), biome check🤖 Generated with Claude Code