Skip to content

Ignore stale children when reconsolidating metadata #2980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TomAugspurger
Copy link
Contributor

This fixes a bug when recreating consolidated metadata, when one of the child groups picked up had (stale) consolidated metadata.

In consolidate_metadata, we already ignore the group.metadata.consolidated_metadata for the root group. The fix is to also ignore the consolidated metadata for any child nodes loaded by .members().

For now, I've made this a new public parameter in .members(). It might be worth keeping it private (by making a _members_private method that takes this parameter). I don't immediately see any other use case for this parameter.

Closes #2921

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.rst
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

Copy link
Contributor

@d-v-b d-v-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks tom!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zarr.consolidated_metadata should not use previously consolidated (stale) metadata
2 participants