cortex icon indicating copy to clipboard operation
cortex copied to clipboard

Fix bug where cleaner does not delete deletable partition group

Open anna-tran opened this issue 1 month ago • 1 comments

What this PR does: A bug was introduced in this PR https://github.com/cortexproject/cortex/pull/7130 where the partition group file is no longer deleted even if it was marked as deletable because the cleaner would only delete partition groups that are both marked as CanDelete and IsCompleted. This causes invalid partition groups (e.g. a block from the group was deleted) to never be cleaned up.

This PR adds back the deletion logic such that if no blocks were deleted for the deletable partition group, it can still be deleted. It also preserves the logic that partition groups are deleted on the second cleaner cycle if the parent blocks needed to be deleted first.

No tests were updated but this was tested in a distributed environment where that left partition groups dangling, and afterwards were cleaned up with the patched image including this change.

Which issue(s) this PR fixes: Fixes #7129

Checklist

  • [ ] Tests updated
  • [ ] Documentation added
  • [X] CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

anna-tran avatar Dec 12 '25 00:12 anna-tran

LGTM

alexqyle avatar Dec 12 '25 00:12 alexqyle