Skip to content

[v3] Re-opening an existing RemoteStore V3 group causes the first child to be deleted #2359

Closed
@rabernat

Description

@rabernat

This is a weird and unexpected behavior

import xarray as xr
import zarr
import s3fs
print(xr.__version__, zarr.__version__)
# -> ('0.9.7.dev3734+g26081d4f', '3.0.0b1.dev8+g9bbfd88')

s3 = s3fs.S3FileSystem()
# replace with your favorite bucket
target_path = "icechunk-test/ryan/zarr-v3/test-92"
store = zarr.storage.RemoteStore(s3, mode="w", path=target_path)

# create a group with two children
group = zarr.open_group(store=store, mode="w", zarr_format=3)
group.create("A", shape=1)
group.create("B", shape=1)
print(group.members())
#  (('A',
#  <Array <RemoteStore(S3FileSystem, icechunk-test/ryan/zarr-v3/test-era5-v3-92)>/A shape=(1,) dtype=float64>),
#  ('B',
#   <Array <RemoteStore(S3FileSystem, icechunk-test/ryan/zarr-v3/test-era5-v3-92)>/B shape=(1,) dtype=float64>))

# re-open the group
store2 = zarr.storage.RemoteStore(s3, mode="w", path=target_path)
group = zarr.open_group(store=store2, mode="w", zarr_format=3)
print(group.members())
# (('B',
#  <Array <RemoteStore(S3FileSystem, icechunk-test/ryan/zarr-v3/test-era5-v3-92)>/B shape=(1,) dtype=float64>),)

Array A has disappeared! That's bad!

This might have something to do with #2338. Really not sure. I haven't gotten to the bottom of it, but I thought I would post a report anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions