Skip to content

Commit 5c33d1c

Browse files
committed
Explain order of consolidated metadata keys in user guide
1 parent f957c13 commit 5c33d1c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/user-guide/consolidated_metadata.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ With nested groups, the consolidated metadata is available on the children, recu
100100
>>> consolidated['child'].metadata.consolidated_metadata
101101
ConsolidatedMetadata(metadata={'child': GroupMetadata(attributes={'kind': 'grandchild'}, zarr_format=3, consolidated_metadata=ConsolidatedMetadata(metadata={}, kind='inline', must_understand=False), node_type='group')}, kind='inline', must_understand=False)
102102

103+
.. versionadded:: 3.1.1
104+
105+
The keys in the consolidated metadata are sorted prior to writing. Keys are
106+
sorted in ascending order by path length, where a path is defined as a sequence
107+
of strings joined by ``"/"``. For keys with the same path length, lexicographic
108+
order is used to break the tie. This behaviour ensures deterministic metadata
109+
output for a given group.
110+
103111
Synchronization and Concurrency
104112
-------------------------------
105113

0 commit comments

Comments
 (0)