Repository navigation
Conversation
reeceyang
force-pushed
the
batch-oversized-op
branch
2 times, most recently
from
December 4, 2026 01:42
3222918 to
f445d3a
Compare
commit: |
reeceyang
force-pushed
the
batch-oversized-op
branch
from
December 4, 2026 06:09
f445d3a to
b18a079
Compare
Every write patches each node on its path to keep counts and sums current, so a batch rewrote a tree's root once per operation. Hold node writes in the batch's node cache and flush them when the batch ends, counting the held writes against the transaction's headroom so the flush always fits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eserve A batch's last operation can read more than the 2 MiB headroom reserve (a split of a full internal node reads every child), overflowing the transaction limit or leaving no room to retire its row. The failed cycle rolled back and retried unchanged, so the queue stalled for good. The inner cycle now runs with transactionLimits that keep the reserve free in the outer transaction. If it overflows after other operations ran, the row is marked to stop before that operation, so the next cycle commits the prefix and the operation then runs first. An operation that can't fit in a cycle of its own is dead-lettered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reeceyang
force-pushed
the
batch-oversized-op
branch
from
December 4, 2026 21:47
b18a079 to
4c11d08
Compare
This was referenced Dec 4, 2026
reeceyang
force-pushed
the
batch-node-writes
branch
from
December 5, 2026 01:28
0371b87 to
4e0a605
Compare
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.
Runs each async batch in a subtransaction with tighter limits, so an operation that reads more than the worker's 2 MiB reserve (a split of a full internal node reads every child) no longer overflows the transaction and stalls the queue for good. A cycle that runs out of room after other operations marks the row to stop before the operation, so the next cycle commits what came before it, and an operation too big for a cycle of its own is dead-lettered. The flush of pending node writes at the end of a cycle runs under the same limits, so a flush that runs out of room also cuts the cycle before its last operation. Splits also read children one at a time, because every read in flight counts when a limit trips, and parallel reads could overshoot the reserve by many nodes.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
🤖 Generated with Claude Code