writer: track attribute creation order with track_order
h5py's track_order=True orders attributes as well as links; the writer tracked links only. A tracking object's header now sets the attribute creation order tracked/indexed flags and carries per-message creation orders, an Attribute Info message holds the next order (inline too), and dense storage gets a type-9 creation-order index. The file default applies to datasets, with DatasetBuilder::track_order per dataset; more than 65 535 attributes on a tracking object is an error (libhdf5's counter is 2 bytes). The reader lists such attributes in creation order. h5py lists them in order (inline, dense, 20 000 on one dataset) and keeps numbering in r+ mode, including its inline-to-dense move. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
+10
-2
@@ -264,8 +264,16 @@ fill-value item that did is fixed).
|
||||
external links at any depth and optional creation-order tracking;
|
||||
h5py, h5dump and `h5rs check --data` read them
|
||||
(`crates/clawhdf5/tests/writer_groups_interop.rs`,
|
||||
`crates/clawhdf5-tools/tests/h5rs_interop.rs`). Still missing:
|
||||
attribute creation order is not tracked.
|
||||
`crates/clawhdf5-tools/tests/h5rs_interop.rs`). ~~Still missing:
|
||||
attribute creation order is not tracked.~~ **Fixed 2026-09-26:**
|
||||
`track_order` (file default, `GroupBuilder`, and the new
|
||||
`DatasetBuilder::track_order`) tracks and indexes attribute creation
|
||||
order as h5py's `track_order=True` does; h5py lists the attributes in
|
||||
the order they were set, inline and dense (20 000 on one dataset), and
|
||||
keeps numbering them in "r+" mode (tank,
|
||||
`cargo test -p clawhdf5 --test writer_groups_interop
|
||||
track_order_lists_attributes_in_creation_order`). libhdf5 numbers at
|
||||
most 65 535 attributes on such an object, so more is an error.
|
||||
- ~~A group with more than 65 535 links, or an object with more than
|
||||
65 535 dense attributes, is an error (the index is one B-tree leaf).~~
|
||||
**Fixed 2026-09-26:** the dense indexes are v2 B-trees of any depth
|
||||
|
||||
Reference in New Issue
Block a user