Skip to content

Commit 06f3df8

Browse files
committed
Remove double index creation from async DataTree open
The zarr v3 async backend was creating indexes inside _open_datatree_from_stores_async, but the framework layer (_datatree_from_backend_datatree in api.py) already handles index creation for all backends. This caused indexes to be created twice per node and made create_default_indexes=False silently ignored. Remove the index creation from the backend to restore the clean main architecture: backends open datasets without indexes, the framework creates them once.
1 parent 15203d9 commit 06f3df8

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

xarray/backends/zarr.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,8 +2009,6 @@ async def _open_datatree_from_stores_async(
20092009
max_concurrency: int | None = None,
20102010
) -> DataTree:
20112011
"""Open datatree groups concurrently using a dedicated executor."""
2012-
from xarray.backends.api import _maybe_create_default_indexes_async
2013-
20142012
if max_concurrency is None:
20152013
max_concurrency = 10
20162014

@@ -2055,7 +2053,6 @@ def _sync_open():
20552053
)
20562054

20572055
ds = await loop.run_in_executor(executor, _sync_open)
2058-
ds = await _maybe_create_default_indexes_async(ds, executor=executor)
20592056
if group:
20602057
group_name = str(NodePath(path_group).relative_to(parent))
20612058
else:

0 commit comments

Comments
 (0)