Skip to content

should groups be allowed to self-annihilate #2826

Open
@d-v-b

Description

@d-v-b

See this example:

>>> from zarr import create_group
>>> create_group({})
<Group memory://126474867787584>
>>> g = create_group({})
>>> g.store._store_dict
{'zarr.json': <zarr.core.buffer.cpu.Buffer object at 0x73073576ef50>}
>>> del g['']        
>>> g.store._store_dict 
{}

There are two issues here -- first, should this be allowed at all? I think not, which means we need to make some changes to how groups resolve node names. Second, how should we handle situations where an in-memory group or array is backed by an invalid or stale stored representation? Would anyone find value in a function that checks whether an array or group is consistent with its stored representation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions