Skip to content

Update Variable metadata when using 'a' mode in Zarr#8159

Closed
krokosik wants to merge 4 commits intopydata:mainfrom
krokosik:data-array-zarr-attrs-update
Closed

Update Variable metadata when using 'a' mode in Zarr#8159
krokosik wants to merge 4 commits intopydata:mainfrom
krokosik:data-array-zarr-attrs-update

Conversation

@krokosik
Copy link
Copy Markdown
Contributor

@krokosik krokosik commented Sep 8, 2023

Because the DataArray in a DataSet's data variable when saving to zarr, the incorrect metadata update behaviour applies to it. This is an attempt to fix the TODO left by PR5252. The tests are passing, but as I'm quite new to this repo, I'm not sure what cases should be tested as well. @shoyer could you share some insight please?

@welcome
Copy link
Copy Markdown

welcome Bot commented Sep 8, 2023

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@github-actions github-actions Bot added topic-backends topic-zarr Related to zarr storage library io labels Sep 8, 2023
@krokosik krokosik changed the title Data array zarr attrs update Update Variable metadata when using 'a' mode in Zarr Sep 8, 2023
@dcherian dcherian requested a review from shoyer September 8, 2023 15:34
@max-sixty
Copy link
Copy Markdown
Collaborator

Sorry this hasn't got a review.

Without being the best informed person on this — one potential issue here — if we're updating the metadata, do we risk a issue with two concurrent writers where each writer needs to read the current metadata, and the first writer can leave the files in a partially corrupted state?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

io topic-backends topic-zarr Related to zarr storage library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updating DataArray attributes in a Zarr archive does not work as for Dataset

2 participants