Repository navigation
Commit b1637af
Write a chunk of a remote array, and read which ones were written
A pre-sized array is filled a chunk at a time, by as many writers as
there are chunks: `C2Array.update_chunk` posts one, and the subscriber
refuses a slot that already holds anything. `written_chunks` reads what
the fill recorded in the frame's own offsets, so progress costs one range
read and no endpoint of its own.
Reading the index turned out not to be the same question as reading
blocks of a chunk: `serves_blocks` also weighs whether splitting a chunk
would pay, which is nothing to do with whether the frame has offsets to
read. Split the geometry half out, so a frame of small chunks can still
say which of them were written.
`invalidate_index` drops what was read of a frame that has since been
written to -- the header as well as the offsets, since a write moves the
frame's length and its payload extent, and the offsets are found through
both. Nothing is read until the next lookup asks.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 41ad9d6 commit b1637af
7 files changed
Lines changed: 103771 additions & 12 deletions
File tree
- src/blosc2
- tests/ndarray
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | | - | |
| 575 | + | |
576 | 576 | | |
577 | 577 | | |
578 | 578 | | |
| |||
859 | 859 | | |
860 | 860 | | |
861 | 861 | | |
| 862 | + | |
862 | 863 | | |
863 | 864 | | |
864 | 865 | | |
| |||
0 commit comments