Skip to content

Prevent partition compaction to compact any blocks marked for deletion#7391

Open
alexqyle wants to merge 2 commits intocortexproject:masterfrom
alexqyle:compact-deleted-blocks
Open

Prevent partition compaction to compact any blocks marked for deletion#7391
alexqyle wants to merge 2 commits intocortexproject:masterfrom
alexqyle:compact-deleted-blocks

Conversation

@alexqyle
Copy link
Copy Markdown
Contributor

@alexqyle alexqyle commented Apr 1, 2026

What this PR does:

When using bucket index to discover blocks, there would be a chance that block marked for deletion got grouped for compaction. This would cause unnecessary double compaction for the same set of blocks for the same time range. To avoid this, add deletion check in planner to make sure all blocks planned for compaction were not marked for deletion.

Note: the reason not simply re-enable deletion filter in fetcher is that fetcher runs in very early stage of compaction. Blocks are still very likely marked for deletion between fetcher runs and planner got called.

Which issue(s) this PR fixes:
NA

Checklist

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

@alexqyle alexqyle force-pushed the compact-deleted-blocks branch from 3033283 to 2dc9cb6 Compare April 1, 2026 23:32
Signed-off-by: Alex Le <leqiyue@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant