Repository navigation
fix(decomposedfs): delete all blobs when purging a space - #971
Merged
Merged
Conversation
Purging a space walked only the directory of the space root node to find the blobs to delete, but the metadata of the other nodes lives in the nodes tree of the space. No blob was deleted, so with an s3 blobstore the data of purged project and personal spaces stayed in the bucket. Walk the whole space directory instead. Fixes opencloud-eu/opencloud#1865 Assisted-by: Claude Code:claude-opus-5-5
aduffeck
requested changes
Nov 5, 2026
| }) | ||
| // purging one space must remove only that space's entry: a sibling | ||
| // space of the same owner must stay in the by-user-id index. | ||
| // purging must delete the blobs of all nodes in the space, not only of the root node |
Member
There was a problem hiding this comment.
That new test should move two lines up, it currently disjoins the other comment from its test.
Delete the blobs before the indexes and the metadata are removed, so that a failed purge can be retried. Skip child symlinks, unparseable metadata files and entries that vanished during the walk instead of aborting the purge. Assisted-by: Claude Code:claude-opus-5-5
aduffeck
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purging a space now deletes the blobs of all its nodes, so with an s3 blobstore the data of purged project and personal spaces no longer stays in the bucket.
DeleteStorageSpacewalked only the directory of the space root node to find blobs, but the node metadata lives in thenodestree of the space, so no blob was found. It now walks the whole space directory (nodes, revisions, trashed nodes). posix is unaffected: there the space root and the root node are the same path.Risk: the purge now reads every
.mpkof the space and deletes the blobs one by one, so purging large spaces takes longer, also on decomposed where the blobs would go with the space directory anyway. A failed or interrupted purge can be retried.Tested with a unit test (fails without the fix) and manually with decomposeds3 + minio: project space delete and user delete remove the objects from the bucket.
Fixes opencloud-eu/opencloud#1865
AI assistance: Claude Code (claude-opus-5-5) found the cause and wrote the fix and the test; tested manually by the author.