Repository navigation
Conversation
When a block no longer exists but its deletion mark is still in the tenant's markers/ location, the bucket index updater skipped the mark at every run and never removed it, so the tenant location stayed in the bucket forever. Delete such a mark when the block location is empty. Fixes cortexproject#7885 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
This branch has not been deployed
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.
What this PR does:
When a block is gone from the bucket but its deletion mark is still in the tenant's
markers/location, the bucket index updater logsskipped missing block deletion markon every run and never removes the mark. The tenant location then stays in the bucket forever, even with no blocks and no bucket index.This change deletes such a mark from the updater. To avoid racing with a block that is being marked for deletion (the global mark is uploaded before the per-block one), the mark is only removed when nothing exists under the block's location. If listing or deleting fails, it is logged and the update continues.
Only block deletion marks are handled. Orphaned no-compact marks are not touched.
Tests: new
TestUpdater_UpdateIndex_ShouldDeleteOrphanedGlobalDeletionMarks(fails without the change). Ran thebucketindexandcompactorblocks cleaner tests on Linux.Which issue(s) this PR fixes:
Fixes #7885
Checklist
Documentation added(no user-facing config or documented behavior changes)CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX](no new flags)docs/configuration/v1-guarantees.mdupdated if this PR introduces experimental flags