-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always skip reads when completely overwriting chunks #2784
base: main
Are you sure you want to change the base?
Always skip reads when completely overwriting chunks #2784
Conversation
Uses `slice(..., None)` to indicate that a `chunk_selection` ends at the boundary of the current chunk. Also does so for a last chunk that is shorter than the chunk size. `is_total_slice` now understands this convention, and correctly detects boundary chunks as total slices. Closes zarr-developers#757
This reverts commit 234431cd6efb661c53e2a832a0e4ea4dca772c1b.
…nks" This reverts commit edbba37.
1da36f4
to
0e00eb3
Compare
@@ -1198,7 +1206,8 @@ def __iter__(self) -> Iterator[ChunkProjection]: | |||
for (dim_sel, dim_chunk_offset) in zip(self.selection, chunk_offsets, strict=True) | |||
) | |||
|
|||
yield ChunkProjection(chunk_coords, chunk_selection, out_selection) | |||
is_complete_chunk = False # TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure where this is used. Is it always True?
#2784 fixes the |
1921878
to
b2be002
Compare
I find the indexing code pretty hard to follow, but this looks good to me |
@normanrz - do you have the bandwidth to give this a review? |
@normanrz if you have time, please prioritize reviewing zarr-developers/numcodecs#700 over this one. |
Teach the *Indexer objects to detect when a selection corresponds to a whole chunk. Propagate that information down to the codec pipeline where reads can be skipped if it makes sense locally.
Closes #757
I'm opening this for comments about the approach (@d-v-b , @normanrz ) it could definitely use more tests (edit: and some fixes)TODO:
changes/