@@ -490,13 +490,11 @@ async def open(
490490
491491 By default, consolidated metadata is used if it's present in the
492492 store (in the ``zarr.json`` for Zarr format 3 and in the ``.zmetadata`` file
493- for Zarr format 2).
493+ for Zarr format 2) and the Store supports it .
494494
495495 To explicitly require consolidated metadata, set ``use_consolidated=True``.
496- If the Store supports consolidated metadata, this will raise an
497- exception if consolidated metadata is not found. If the Store doesn't want
498- to use consolidated metadata, we assume it implements its own consolidation,
499- so this is equivalent to use_consolidated=False.
496+ In this case, if the Store doesn't support consolidation or consolidated metadata is
497+ not found, a ``ValueError`` exception is raised.
500498
501499 To explicitly *not* use consolidated metadata, set ``use_consolidated=False``,
502500 which will fall back to using the regular, non consolidated metadata.
@@ -507,13 +505,14 @@ async def open(
507505 """
508506 store_path = await make_store_path (store )
509507 if not store_path .store .supports_consolidated_metadata :
508+ # Fail if consolidated metadata was requseted but the Store doesn't support it
510509 if use_consolidated :
511510 store_name = type (store_path .store ).__name__
512- warnings .warn (
513- f"The Zarr Store in use ({ store_name } ) doesn't support consolidated metadata "
514- f"or has its own consolidation. Ignoring use_consolidated={ use_consolidated } ." ,
515- stacklevel = 1 ,
511+ raise ValueError (
512+ f"The Zarr store in use ({ store_name } ) doesn't support consolidated metadata."
516513 )
514+
515+ # if use_consolidated was None (optional), the Store dictates it doesn't want consolidation
517516 use_consolidated = False
518517
519518 consolidated_key = ZMETADATA_V2_JSON
0 commit comments