You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #191 / PR #193, which made zarr.consolidate_metadataopt-in (output.consolidate_metadata: true, default false). When it is requested, consolidation still reads the store's ~4,102 zarr.json metadata objects serially (~17 ms/GET → ~70 s on the o9 NEON store). This tracks making the opt-in path fast so it isn't a foot-gun.
zarr==3.2.1's consolidate_metadata(store, path=None, zarr_format=None) exposes no concurrency parameter — the only lever is the global zarr.config['async.concurrency'] (default 10). Whether raising that actually parallelizes the ~4,102-object serial-GET path can't be verified without the production store the #180 measurements ran against. Per #191's own guidance ("if it doesn't expose concurrency cleanly, don't fight it — note the finding and defer; do not add a dependency"), PR #193 shipped the default-skip and deferred this. The opt-in path is off by default, so today this is latent, not a live foot-gun.
Options to evaluate
Measure zarr.config['async.concurrency'] against a real consolidated run — does bumping it from 10 collapse the ~70 s? If so, the fix is a one-line config set inside the opt-in branch (no new code, no dep). Cheapest if it works.
Bounded-pool reimplementation — enumerate the metadata objects and fetch them through a ThreadPoolExecutor (or a concurrent obstore batch), then assemble the consolidated blob. More code, but independent of whatever consolidate_metadata does internally. Reuses the store/obstore stack already in the repo — no new dependency.
output.consolidate_metadata: true still produces a valid consolidated store, now via parallel metadata reads.
Measured wall-time drop on a representative store (target ~70 s → single-digit seconds).
No new dependency added without discussion (§4).
Read-parity unaffected (the consolidated blob's contents are unchanged; only how it's assembled).
Refs: #191 (opt-in decision), PR #193 (the default-skip that landed), #180 (the ~70 s serial-read measurement + wall-time breakdown), #189 (the related write-side metadata-op storm).
Filed for triage — no action label applied; label implement/plan/discuss to bring it into scope.
🤖 from Claude
Summary
Follow-up to #191 / PR #193, which made
zarr.consolidate_metadataopt-in (output.consolidate_metadata: true, defaultfalse). When it is requested, consolidation still reads the store's ~4,102zarr.jsonmetadata objects serially (~17 ms/GET → ~70 s on the o9 NEON store). This tracks making the opt-in path fast so it isn't a foot-gun.Why it was deferred (not done in PR #193)
zarr==3.2.1'sconsolidate_metadata(store, path=None, zarr_format=None)exposes no concurrency parameter — the only lever is the globalzarr.config['async.concurrency'](default 10). Whether raising that actually parallelizes the ~4,102-object serial-GET path can't be verified without the production store the #180 measurements ran against. Per #191's own guidance ("if it doesn't expose concurrency cleanly, don't fight it — note the finding and defer; do not add a dependency"), PR #193 shipped the default-skip and deferred this. The opt-in path is off by default, so today this is latent, not a live foot-gun.Options to evaluate
zarr.config['async.concurrency']against a real consolidated run — does bumping it from 10 collapse the ~70 s? If so, the fix is a one-line config set inside the opt-in branch (no new code, no dep). Cheapest if it works.ThreadPoolExecutor(or a concurrent obstore batch), then assemble the consolidated blob. More code, but independent of whateverconsolidate_metadatadoes internally. Reuses the store/obstore stack already in the repo — no new dependency.async.concurrencydoesn't reach it, note it for a zarr-python feature ask (a concurrency arg onconsolidate_metadata), alongside the metadata-op-storm ask on Sharded CSR writes issue a per-array metadata-op storm — upstream ask: a no-probe / batch array-creation path in zarr-python #189.Acceptance (when picked up)
output.consolidate_metadata: truestill produces a valid consolidated store, now via parallel metadata reads.Refs: #191 (opt-in decision), PR #193 (the default-skip that landed), #180 (the ~70 s serial-read measurement + wall-time breakdown), #189 (the related write-side metadata-op storm).
Filed for triage — no action label applied; label
implement/plan/discussto bring it into scope.