Skip to content

A previous version whose counts cannot fit ends the chain before anyt… - #1337

Merged
noha merged 1 commit into
mainfrom
a-head-that-cannot-fit-ends-the-chain
Oct 10, 2026
Merged

noha merged 1 commit into
mainfrom
a-head-that-cannot-fit-ends-the-chain

Conversation

@noha

@noha noha commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

…hing is allocated

The check of 62398e23 followed the previous version of 1:30197 into the bytes of another record. Read as a head they gave 530 million behavior descriptions, #readHeadFrom: asked for a collection of four gigabytes, and the scheduler was killed; the overlap guard of #versionsOf:in:onFault:do: only looks after the head has been read.

The chain walk now reads a previous version with #headAtPosition:before:, which holds every count of the head against the bytes left before the record after it, or before the end of the file, before it allocates (SoilPersistentClusterVersion>>readHeadFrom:within:). A count that cannot fit is a read error, and the chain ends there as a SoilBrokenVersionChain at the last record that is fine. #readHeadFrom:, which every read takes, is left as it is.

@noha
noha requested a review from MarcusDenker October 10, 2026 07:49
…efore reading it

The check of 62398e23 followed the previous version of 1:30197 into the bytes
of another record. Read as a head they gave 530 million behavior
descriptions, #readHeadFrom: asked for a collection of four gigabytes, and the
scheduler was killed; the overlap guard of #versionsOf:in:onFault:do: only
looks after the head has been read.

Before the walk reads a previous version, SoilConsistencyTracker reads the
three counts from the raw bytes (#countsOfHeadAt:in:fitBefore:) and holds each
against the bytes left before the record after it, or before the end of the
file. A count that cannot fit is a read error, and the chain ends there as a
SoilBrokenVersionChain at the last record that is fine. Nothing outside the
tracker changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noha
noha force-pushed the a-head-that-cannot-fit-ends-the-chain branch from a79d4d4 to 03e5fd6 Compare October 10, 2026 07:55
@noha
noha merged commit 6e3aa01 into main Oct 10, 2026
5 checks passed
@noha
noha deleted the a-head-that-cannot-fit-ends-the-chain branch October 10, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant