Open
Conversation
d-v-b
commented
Jan 15, 2026
| "array_fixture", | ||
| [ | ||
| ArrayRequest(shape=(128,) * 3, dtype="uint16", order="F"), | ||
| ArrayRequest(shape=(127, 128, 129), dtype="uint16", order="F"), |
Contributor
Author
There was a problem hiding this comment.
by making the shape of the array irregular w.r.t to the chunk shape, we hit the partial decode path, which required for evoking the bug reported in #3652
d-v-b
commented
Jan 15, 2026
| spath, | ||
| data=data, | ||
| chunks=(64,) * data.ndim, | ||
| compressors=None, |
Contributor
Author
There was a problem hiding this comment.
setting compressors to None here is also required to trigger the partial decode path.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3655 +/- ##
==========================================
- Coverage 60.88% 60.55% -0.34%
==========================================
Files 86 86
Lines 10182 10226 +44
==========================================
- Hits 6199 6192 -7
- Misses 3983 4034 +51
🚀 New features to boost your workflow:
|
2cfd6d5 to
4379a66
Compare
…x/nested-shard-reads
… into fix/nested-shard-reads
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 #3652 by properly allowing byte range requests in the partial decoding pathway of the sharding codec.
The failure was caused by a certain store-like class (defined just for sharding) failing to handle byte range requests.
There are 2 ways to fix this. One leaves a lot of the cruft in the sharding codec intact and just adds modifies some existing methods. But the other approach removes cruft, and re-uses stuff we have already defined elsewhere in the codebase: the Store API.
That's what this PR does.Edit -- this PR now keeps the cruft, with the goal of keeping things small and simple. I just add byte-range support to the shard-specific bytegetter.In a later PR:
ShardingByteGetterandShardingByteSettercan be removed, and instead the sharding codec creates Store classes as part of its decoding process. When reading a full shard, a_ShardReaderStoreis created, which maps string keys (the names of chunks) onto contiguous ranges in a buffer (the shard bytes). When reading a partial shard, the separate chunk byte regions are used to create aMemoryStore.Using the
StoreAPI here means nested sharding just works, and we get an easy way to add things like caching later.