We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
coalesce_max_bytes
1 parent 51d77aa commit b8a1fbbCopy full SHA for b8a1fbb
src/zarr/codecs/sharding.py
@@ -589,10 +589,8 @@ def _coalesce_chunks(
589
590
for chunk in sorted_chunks[1:]:
591
gap_to_chunk = chunk.byte_slice.start - current_group[-1].byte_slice.stop
592
- current_group_size = (
593
- current_group[-1].byte_slice.stop - current_group[0].byte_slice.start
594
- )
595
- if gap_to_chunk < max_gap_bytes and current_group_size < coalesce_max_bytes:
+ size_if_coalesced = chunk.byte_slice.stop - current_group[0].byte_slice.start
+ if gap_to_chunk < max_gap_bytes and size_if_coalesced < coalesce_max_bytes:
596
current_group.append(chunk)
597
else:
598
groups.append(current_group)
0 commit comments