Repository navigation
Conversation
Any reader's failure used to reach the loaders as ReadFailed, so a shard that ends inside a tensor it reads, or a source that is gone, could not be told apart. readAll now returns the first reader's own error (EndOfFile, FileNotFound, or direct_io's ReadFailed), through Gather.read and Pair.wait alike, to checkpoint_direct's loaders and Flash Next's experts, which pass it on with try. Tests: a file cut inside the last of four pieces, on and off a 4 KiB boundary, gives direct_io's own error for that read; a removed file gives FileNotFound; on Linux, checkpoint_direct stops the layer a cut lands in with EndOfFile after reading the layer before it.
Engram extents are 512-byte aligned. On a disk whose direct reads need 4 KiB (or a file system that takes the O_DIRECT open but not the read), every extent's read failed with EINVAL, so good rows gave EngramReadFailed in every reader mode; nothing fell back as direct_io does. openTable now reads one sector at a sector first: refused with EINVAL, it clears O_DIRECT on the shard's descriptor and the table is buffered, as on a file system without O_DIRECT. The serial, threaded, io_uring and AIO readers all read that descriptor, so the read path is unchanged; a 512-byte disk keeps its direct reads and extents. Test (Linux): a fake disk refusing direct reads off 4 KiB, or off 512 bytes, or none, under every reader mode: the same row bytes and the same extents each time, direct except on the 4 KiB disk, which refused only the check at open.
Owner
Author
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.
CI for a landing train: #2610 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.