-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Switch default for Zarr reading/writing to consolidated=True? #5251
Labels
Comments
shoyer
changed the title
Switch default for Zarr reading/writing consolidated=True?
Switch default for Zarr reading/writing to consolidated=True?
May 3, 2021
I see six 👍 on this issue so I'm going to go ahead and get started :) |
3 tasks
I pushed this change in another commit to #5252. |
Should this be closed now that #5252 has gone in? |
Thanks @hammer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consolidated metadata was a new feature in Zarr v2.3, which was released over two year ago (March 22, 2019).
Since then, I have used
consolidated=True
every time I've written or opened a Zarr store. As far as I can tell, this is almost always a good idea:I wonder if consolidated metadata is mature enough now that we could consider switching the default behavior in Xarray. From my perspective, this is a big "gotcha" for getting good performance with Zarr. More than one of my colleagues has been unimpressed with the performance of Zarr until they learned to set
consolidated=True
.I would suggest doing this in way is almost entirely backwards compatible, with only a minor performance costs for reading non-consolidated datasets:
to_zarr()
switches the default toconsolidated=True
. Theconsolidate_metadata()
will thus happen by default.open_zarr()
switches the default toconsolidated=None
, which means "Try reading consolidated metadata, and fall-back to non-consolidated if that fails." This will be slightly slower for non-consolidated metadata due to the extra file-lookup, but given that opening with non-consolidated metadata already requires a moderately large number of file look-ups, I doubt anyone will notice the difference.CC @rabernat
The text was updated successfully, but these errors were encountered: