Repository navigation
rows: a state its family refuses while it scatters is forgotten after one recall - #1543
Merged
Merged
Conversation
… one recall rows_read.one and the read-ahead branch of read called the family's scatter with a bare try, so a refusal inside it skipped bad: nothing was counted or logged and the state stayed in the store, where every later recall that picked it read its files again. Nemotron's SnapshotSize, Qwen3.5's and FlashNext's KeptWordsDiffer and BadKeptRange, and DiskWords where a family raises it all took that path. Both paths now copy through one helper that sends a refusal to bad with the file being copied (a block's .blk, or the state's own .st), so that file is counted, logged and unlinked with every state naming it, once. A refusal is words the family will not take (DiskWords, KeptWordsDiffer) or a size or range that does not fit its blank (SnapshotSize, BadKeptRange); they are listed in one switch (refused), so a family's new one is a single line. Other errors, a failing link or memory, pass through as before and keep the state and its read. bad now drops the read ahead of every state it forgets (Prefetch.forget), whichever caller got there: a taken read stayed listed until a sweep, and would have been joined again, with the refused words, by a state of the same name that is written later. The Fake family gains a scatters fault (after n copies, every one fails with a given error). rows_refusal_test.zig recalls a state with the fault on a shared head block (both states going), on the state's own file (only it going) and with a transient error (kept), synchronously and with both states read ahead, checking the counts, the states, the files and the reads of both. Fixes ashhart#1539.
Owner
|
Thank you @wojo. This is in TensorFold 1.2.0, released today: https://github.com/ashhart/TensorFold/releases/tag/v1.2.0 It landed with your commits under your own name, so you're listed as a TensorFold contributor, and it's credited to you in the release notes and the changelog. |
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.
Fixes #1539.
A disk state that its family refuses while it scatters is now forgotten after one recall, the way a file that fails
its own checks already is.
What changes
rows_read.oneand the read-ahead branch ofreadcalled the family'sscatterwith a baretry. Both now go through one helper. A refusal goes tobadwith the file being copied (a block's.blk, or thestate's own
.st), so that file is counted, logged and unlinked once, with every state that names it.DiskWords,KeptWordsDiffer), or a size or rangethat does not fit its blank (
SnapshotSize,BadKeptRange). They are one switch (refused), so a family's newrefusal is one line. On main, Nemotron raises
SnapshotSize, and Qwen3.5 and Flash Next raiseKeptWordsDifferandBadKeptRange, all from insidescatter. GLM'sDiskWordsarrives with GLM-5.3-Flash on CUDA keeps conversation states on disk, every rank's part (--learn-conversations) #1411.badnow drops the read ahead of every state it forgets (Prefetch.forget), whoever called it.Before, a taken read stayed listed until a sweep, and a state of the same name written later could have joined it
again, refused words and all.
Tests
rows_refusal_test.zigrecalls a state with the fault on a shared head block (both states go), on the state's ownfile (only it goes) and with a transient error (kept). It does this synchronously and with both states read ahead,
and checks the counts, the states, the files and the reads of both. The Fake family gains a
scattersfault (aftern copies, every one fails with a given error).
rows_refusal_test.zig:126(expected 1, found 0: nothing counted, thestate kept).
KeptWordsDifferorBadKeptRangeremoved fromrefused, both fail at the same line.Prefetch.forgetremoved frombad, the read-ahead test fails at:137(expected 2, found 0: theforgotten states' reads never freed).
Host (Zig 0.17.0, an M4 Mac), on the branch's head:
test-rows-host,test-rows-prefetch-host,test-learn-recovery,test-cuda-host,test-snapshot-index-host,test-lane-api-hostandtest-goldenpass(286/286 steps).
zig fmt --checkandgit diff --checkare clean, andlean_check.pyreports 426 on main and on thebranch. No GPU run: on main a scatter refusal follows only a writer bug, and these tests drive it through the Fake
family.
By Robert Wojciechowski (wojo on GitHub, @rwojo on X)