-
Notifications
You must be signed in to change notification settings - Fork 537
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
Global markers bucket now deletes both markers, and only reports "Exists" if both markers exists. #1015
Conversation
…s" if both files exist. Signed-off-by: Peter Štibraný <[email protected]>
6389ec8
to
ecdea7d
Compare
Signed-off-by: Peter Štibraný <[email protected]>
Signed-off-by: Peter Štibraný <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I know enough about to Thanos to judge whether this change in behavior makes sense, otherwise the code looks good to me.
Signed-off-by: Peter Štibraný <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! I left a nit.
Signed-off-by: Peter Štibraný <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
What this PR does: This PR modifies
globalMarkersBucket
in two ways:Delete
on block-local marker file, global marker file is always deleted too, even if block-local marker file doesn't exist.Exists
on block-local marker file, it returns true only if global marker file exists as well. This helpsMarkForDeletion
andMarkForNoCompact
functions from `github.com/thanos-io/thanos/pkg/block' pacakge to correctly re-upload marker files, if block-local marker already exists, but global marker file doesn't exist.This fixes problem that appears in the log files as:
requested to mark for deletion, but file already exists; this should not happen; investigate
requested to mark for no compaction, but file already exists; this should not happen; investigate
Due to above logic, compactor was unable to clean up some blocks properly, which could cause that these blocks remain in the bucket as partial blocks.
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]