Skip to content

Add sharding.read.* coalescing runtime config options#3987

Open
aldenks wants to merge 3 commits into
zarr-developers:mainfrom
aldenks:sharding-coalesce-config-options
Open

Add sharding.read.* coalescing runtime config options#3987
aldenks wants to merge 3 commits into
zarr-developers:mainfrom
aldenks:sharding-coalesce-config-options

Conversation

@aldenks
Copy link
Copy Markdown
Contributor

@aldenks aldenks commented May 20, 2026

Follow up #3004 by adding runtime configuration options for the thresholds that control how requests are coalesced when reading in the sharding codec.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions Bot added the needs release notes Automatically applied to PRs which haven't added release notes label May 20, 2026
@github-actions github-actions Bot removed the needs release notes Automatically applied to PRs which haven't added release notes label May 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.39%. Comparing base (68c92f6) to head (0537ddd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3987   +/-   ##
=======================================
  Coverage   93.39%   93.39%           
=======================================
  Files          88       88           
  Lines       11840    11841    +1     
=======================================
+ Hits        11058    11059    +1     
  Misses        782      782           
Files with missing lines Coverage Δ
src/zarr/codecs/sharding.py 91.96% <100.00%> (+0.02%) ⬆️
src/zarr/core/config.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@d-v-b
Copy link
Copy Markdown
Contributor

d-v-b commented May 20, 2026

disclaimer: I'm not a big fan of our global config object, so I'd like to explore some alternative ways for the sharding reads to access this configuration.

A few options:

  • new attributes on the sharding codec
    I'm not a big fan of this, because declaring the sharding codec explicitly from create_array is tedious, and also because we want to move away from the codecs knowing too much about IO operations.
  • new fields on ArrayConfig
    probably the best option. we still use the global config for setting the defaults, but the sharding codec gets these parameters from the array config object, which is tied to the array, not a mutable global.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants