fix: explicit store sync-IO capability; wrappers forward it; LatencyStore fixes - #4206
fix: explicit store sync-IO capability; wrappers forward it; LatencyStore fixes#4206d-v-b wants to merge 1 commit into
Conversation
186c392 to
1d123cf
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4206 +/- ##
==========================================
+ Coverage 93.91% 93.95% +0.03%
==========================================
Files 91 91
Lines 12723 12768 +45
==========================================
+ Hits 11949 11996 +47
+ Misses 774 772 -2
🚀 New features to boost your workflow:
|
|
Is it an option to not yet support store composition with |
It's a bit tricky because our wrapper stores like the latencystore and logging chiefly exist to make testing other zarr components easier. So if we prevented them from working with the fused codec pipeline, we would be denying ourselves a powerful tool for debugging the fused codec pipeline. |
|
@maxrjones I'm open to other solutions here. for example, we could mint totally new |
|
A third alternative, and perhaps the simplest: we just make this attribute private. I'm going to move in that direction for now. |
a9b0e73 to
c3dfafc
Compare
|
The recent changes no longer introduce new public API. instead, the fused codec pipeline checks a private helper called I will update the PR description accordingly. |
c3dfafc to
0227efd
Compare
…rs forward it The fused write gate checked only SupportsSetSync, but write_sync also needs get_sync (partial-chunk read-modify-write) and delete_sync (all-fill chunk cleanup): a set-sync-only store passed the gate, wrote some chunks, then died mid-batch with TypeError. And WrapperStore forwarded no *_sync method, so every wrapped store (e.g. LatencyStore) silently lost the sync fast path — latency benchmarks measured the async fallback while claiming to measure the fused sync path. Both gates now consult _store_supports_sync_io: structural membership in SupportsSyncStore (the full get/set/delete sync surface) combined with a per-instance _supports_sync_io opt-out (absent means capable). This is a private, interim convention pending a formal sync/async store architecture — the store-side twin of the codec-side _sync_capable convention from zarr-developers#4179 — deliberately not new public API. WrapperStore delegates the three sync methods and forwards the wrapped store's capability, so wrapping a sync store keeps the fast path and wrapping an async-only store falls back cleanly; LoggingStore logs the delegated sync calls. LatencyStore fixes: sync reads/writes now sleep the configured latency on the worker thread; get_ranges/get_partial_values route through the latency-injecting get instead of bypassing the wrapper; _with_store passes the raw (loc, scale) latency config instead of a single sampled float, so derived stores keep the distribution. Assisted-by: ClaudeCode:claude-fable-5
0227efd to
029e05a
Compare
Summary
The first version of this PR had the following summary:
The changes in this PR have been amended such that it is better described by this summary:
This PR also makes the following fixes:
WrapperStoreforwards sync methods + the capability to the wrapped storeLatencyStoresync reads / writes, get_ranges and get_partial_values actually see the configured latency(loc, scale)distribution of latencies instead a single frozen sampleFor reviewers
Please check if this new public API on the
Storeclass is correctly scoped.Based on a claude-authored PR: d-v-b#257
Author attestation
TODO
docs/user-guide/*.mdchanges/