Conversation
First building block for readBulk (zarr-developers#99): reading many regions efficiently needs a way to fetch many byte ranges of one shard without paying one request per range. - Store.getRanges(keys, starts, ends[, maxGapBytes, maxCoalescedBytes]) is a default method, so every store supports it. It coalesces nearby ranges into one get(keys, start, end) per group and slices the result back into per-range buffers, returned in input order (null if the key is missing). Limits default to 1 MiB gap / 16 MiB per fetch, as in zarr-python's Store.get_ranges. - ByteRangeCoalescer ports zarr-python's coalesce_ranges. - FilesystemStore overrides getRanges to open the file once and read each range directly; coalescing buys nothing locally. Nothing calls getRanges yet; switching the sharding codec over and adding readBulk follow separately. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
normanrz
approved these changes
Sep 24, 2026
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.
First building block for readBulk (#99): reading many regions efficiently needs a way to fetch many byte ranges of one shard without paying one request per range.
Store.getRanges(keys, starts, ends[, maxGapBytes, maxCoalescedBytes]) is a default method, so every store supports it.
It coalesces nearby ranges into one get(keys, start, end) per group and slices the result back into per-range buffers, returned in input order (null if the key is missing).
FilesystemStore overrides getRanges to open the file once and read each range directly; coalescing buys nothing locally.