Skip to content

Commit 12f2009

Browse files
authored
bug: move consolidate metadata out of loop (#380)
1 parent 52e854d commit 12f2009

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mdio/api/convenience.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ def create_rechunk_plan(
164164
)
165165
)
166166

167+
zarr.consolidate_metadata(source.store)
168+
167169
n_dimension = len(data_array.shape)
168170
dummy_array = zarr.empty_like(data_array, chunks=(MAX_BUFFER,) * n_dimension)
169171
iterator = ChunkIterator(dummy_array)
@@ -202,8 +204,6 @@ def write_rechunked_values( # noqa: PLR0913
202204
for array in data_arrs_out:
203205
array[slice_] = source._traces[slice_]
204206

205-
zarr.consolidate_metadata(source.store)
206-
207207

208208
def rechunk_batch(
209209
source: MDIOAccessor,

0 commit comments

Comments
 (0)