clawhdf5-netcdf4: an unlimited dimension reports its current length
CI / test-arm64 (pull_request) Successful in 1m34s
CI / test (pull_request) Successful in 30m38s

Dimension::size of an unlimited dimension was its dimension scale's
extent, which netCDF-C leaves at 0, so it read 0 for a dimension holding
records. It is now what netCDF-C reports (nc4_find_dim_len): the largest
current extent of the variables using it in any group, found through the
scale's REFERENCE_LIST, a coordinate variable's own extent included; 0
when nothing has been written.

interop_tests::unlimited_dimension_lengths_match_netcdf4_python compares
with netCDF4-python (variables of different lengths, one in a subgroup,
an unwritten dimension, a coordinate variable shorter than another
variable on its dimension, a subgroup's own dimension); before the fix it
got time 0/6, rec 3/5, srec 0/1.

The known-issues entry moves to Fixed; the crate README's warning goes.
A new open entry records a related bug found meanwhile: variables'
dimensions are matched by size, not DIMENSION_LIST.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
osobh
2026-09-28 21:24:59 -05:00
co-authored by Claude Opus 5.5
parent 3eca5d8334
commit 31efac1ae1
5 changed files with 236 additions and 21 deletions
+15
View File
@@ -15,6 +15,21 @@
after. The agent store's lock file unlocks on drop the same way (its
250 ms retry on open had hidden the race). `docs/known-issues.md`.
### NetCDF-4: unlimited dimensions report their length (2026-09-28)
- `clawhdf5-netcdf4`'s `Dimension::size` of an unlimited dimension was the
extent of its dimension scale, which netCDF-C leaves at 0 (or, for a
coordinate variable, that variable's own length), so it read 0 for a
dimension holding records. It is now what netCDF-C reports
(`nc4_find_dim_len`): the largest current extent of the variables using
the dimension in any group (the scale's `REFERENCE_LIST`), a coordinate
variable included; 0 when nothing has been written. Test:
`interop_tests::unlimited_dimension_lengths_match_netcdf4_python`
(variables of different lengths, one in a subgroup, an unwritten
dimension, a coordinate variable shorter than another variable on its
dimension, a subgroup's own dimension), compared with netCDF4-python.
Affected v2.1.0 to v2.7.0. `docs/known-issues.md` also gains an open
entry found meanwhile: variables' dimensions are matched by size.
### `ObjectHeader::parse` back at its pre-M2/M3 speed (2026-09-27)
- Parsing a version-1 object header was 4% slower than before range-read
M2/M3 (`docs/known-issues.md`). The cause was the call to the per-chunk