-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
compact: add label when no labels left after deduplication #2526
compact: add label when no labels left after deduplication #2526
Conversation
Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
504a43b
to
092ba1e
Compare
…el-if-empty Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
…el-if-empty Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
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.
Overall looks great. Thanks for fixing it.
However, to simplify flow rather than introducing a new CLI flag, could we just add an automated external label? Something like given_replica_label=compacted|deduped
or constant_replica_label=compacted=deduped
. WDYT?
Sure, will rewrite then to use first label name from list set in |
Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
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.
hm.. It's brutal but think it makes sense. Thanks!
Still no unique external labels will affect people. I would also add leve.Warn
log line mentioning this. WDYT? (:
Thanks! looking forward to update and then we can merge for 0.13 release.
Good idea @kakkoyun ! |
I can add |
Really? It's every compaction so it's fine. And also you should have unique label per each "stream" as it will easier to scale to more streams some day. That's why log . |
Signed-off-by: Alexander Ryabov <alexander.ryabov@jetbrains.com>
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! |
Changes
Fixes #2550
Per #1014 (comment) i'm adding new flag
--deduplication.label-if-empty=label=value
to handle situation, when there are no labels left after deduplication.Verification
Basic tests added.
Tested manually on our data, collected by 3 thanos-receive with only
--label=replica="$(NAME)"