Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] deleting a group does not delete subgroups #2191

Closed
Tracked by #2412
dcherian opened this issue Sep 17, 2024 · 2 comments · Fixed by #2430
Closed
Tracked by #2412

[v3] deleting a group does not delete subgroups #2191

dcherian opened this issue Sep 17, 2024 · 2 comments · Fixed by #2430
Labels
bug Potential issues with the zarr-python library
Milestone

Comments

@dcherian
Copy link
Contributor

dcherian commented Sep 17, 2024

Zarr version

3

Numcodecs version

?

Python Version

?

Operating System

?

Installation

?

Description

deleting a group does not delete subgroups.

Discovered in #2189

Steps to reproduce

import zarr
from zarr.store import MemoryStore

store = MemoryStore(mode="w")
g1 = zarr.group(store=store)
g1.create_group("0")
g1.create_group("0/0")
del g1["0"]
g1["0/0"] # succeeds

Additional output

No response

@dcherian dcherian added the bug Potential issues with the zarr-python library label Sep 17, 2024
@zoj613
Copy link

zoj613 commented Sep 17, 2024

Looks like the MemoryStore implementation is missing a erase_prefix function to allow proper deletion of a group and its children.

@jhamman
Copy link
Member

jhamman commented Oct 22, 2024

I have a fix for this in the works.

@jhamman jhamman changed the title deleting a group does not delete subgroups [v3] deleting a group does not delete subgroups Oct 22, 2024
@jhamman jhamman added this to the 3.0.0 milestone Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Potential issues with the zarr-python library
Projects
Status: Done
3 participants