You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3bc802f
Browse filesBrowse the repository at this point in the historyBrowse files
perf(metadata): read each upgraded member once, concurrently, and adopt it
A group handle kept the consolidated copies of upgraded members flagged, so
every later group write re-read every such member, one after another, and
read each twice on the first write (once to parse, once to diff).
- `save_metadata` returns the metadata it stored; `AsyncGroup._save_metadata`
(attrs, `update_attributes`, `delitem`, `consolidate_metadata`) and
`Group.update_attributes_async` adopt it, so later writes read no member.
- The refresh visits only nested groups and flagged members, and reads them
with one `asyncio.gather`. The documents it reads are the ones the upsert
diffs against (`read_documents` + `upsert_metadata(..., stored)`), and the
array write path does the same.
- `parse_stored_array` (documents -> silently marked metadata) replaces
`read_stored_array`'s `(metadata, bool)` tuple, and is the one "read, mark,
don't warn" path, also for code-built metadata.
- A flagged member whose own document is gone or cannot be read (invalid,
replaced by a group) keeps its consolidated copy instead of failing every
group write.
- `parse_array_metadata` of a metadata object reads it as a stored document
only when `ArrayV2Metadata.chunks` holds a 0, the one chunk size that
constructors still accept and the upgrades change. This removes the
per-construction `to_dict` + upgrade (AsyncArray() back to 3.4.0 speed)
and building arrays from codec configurations holding NumPy scalars
works again, as in 3.4.0.
- `create_hierarchy` documents that it stores a group's consolidated
metadata as given.
- Tests: second group write reads no member; nested member refresh; member
without a readable document; NumPy-scalar codec configuration; stale
handle whose inner chunk shape alone changed (kills `_chunk_layout`
returning only the outer grid).
Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments