Dask and Zarr parallel writes: inspect shard ownership before trusting a readable file
Overlapping partial updates to one shard can separate successful completion from pixel preservation.
Dask and Zarr parallel writes: inspect shard ownership before trusting a readable file
Readable output does not establish absence of write races. Check shard ownership together with source-pixel preservation. Different task blocks can still target the same automatically resolved physical shard. Handing over a readable file can lead an analyst to treat a default-filled location as an observation. [1, 2, 3]
Scope of the source report
Dask issue 12631 demonstrates lost values when automatic sharding groups multiple write blocks into one shard under parallel updates. It supplies serial, locked and shard-aligned rechunking controls. Its passing overwrite-mode control used a locking path in the tested version; it is not general advice to overwrite data as a fix. [1]
What to inspect in the input
Record the resolved shard layout and write blocks, then compare serial and parallel results with source values by coordinate. Do not generalize serial success to another storage backend or distributed workers. Consider throughput costs for locking and ownership and memory implications for rechunking. [1, 3]
A small acceptance example
Define an illustrative source value of 37 at a selected coordinate. A stored 37 passes that coordinate's preservation check; 0 fails even if the file can be opened. One passing coordinate does not approve the whole array. Reconcile source coordinates across the actual consumption scope. [1, 3]
The boundary passed to Truthound
ColumnPairValidator in Truthound Core 3.3.2 can compare prepared original_value and stored_value by coordinate. Check null separately and do not fill defaults before completing the comparison. Truthound does not synchronize concurrent writes. Verify shard-level ownership or suitable locking in the execution layer, then retest the same parallel conditions. [1, 2, 3]
Application conditions
Link approved original cell values to values read back from storage by coordinates, recording writer ownership for each shard.
Alternatives
Validate rechunking or a suitable locking strategy that aligns shards with writer ownership in the execution layer.
Limitations
Result checks cannot synchronize concurrent writes, and the reported test does not guarantee behavior on other storage backends.
Evidence
- Event checked
- Subject checked
- Modified
