fix: shape the value buffer for coordinate selections in sharded writes - #4284
Open
dylanpulver wants to merge 3 commits into
Open
fix: shape the value buffer for coordinate selections in sharded writes#4284dylanpulver wants to merge 3 commits into
dylanpulver wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4284 +/- ##
=======================================
Coverage 94.12% 94.12%
=======================================
Files 92 92
Lines 12831 12835 +4
=======================================
+ Hits 12077 12081 +4
Misses 754 754
🚀 New features to boost your workflow:
|
Contributor
|
🤖 AI text below 🤖 Code reviewFound 1 issue:
Missing-fix location: zarr-python/src/zarr/codecs/sharding.py Lines 798 to 806 in 01aac1f The reshape added on the async side: zarr-python/src/zarr/codecs/sharding.py Lines 1361 to 1374 in 01aac1f Sync decode twin already carrying the mirrored reshape: zarr-python/src/zarr/codecs/sharding.py Lines 1306 to 1309 in 01aac1f 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
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.
Summary
Nightly
Slow Hypothesis CIon main filed #4280 on 2026-08-22 and hit it again on 2026-08-25 (run 32792180919):ValueError: shape mismatch: value array of shape (3,1) could not be broadcast to indexing result of shape (3,). An orthogonal set on a sharded array with two array-indexed dimensions reproduces it:OrthogonalIndexerhands such a chunk selection down as annp.ix_pair (indexing.py:989).get_indexerreads it back as a coordinate selection, whose projections addressshard_arrayflat while the caller shaped it likesel_shape._decode_partial_singlereshapesouttosel_shapeon the way out (sharding.py:1085); this does the same on the way in. Reads were unaffected.For reviewers
Guarded on
shard_array.shape == sel_shape, so a flat value passes through. Checked against a numpynp.ix_oracle over 1568 combinations of chunk grid, sharding nesting, per-dimension selector: 96 failures on main, 0 after, every one a write with two array-indexed dimensions.Author attestation
TODO
changes/