-
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
Introduce an internal option to enable vertical compaction #1917
Introduce an internal option to enable vertical compaction #1917
Conversation
Thanks @brancz for your quick feedback. My take on #1276 :
What's your take? |
I think that's generally fair. If we go ahead with something here though I think it at least needs to work with duplicate blocks due to thanos receive replication, which would just mean that a labelset (usually a single label, but can in theory be mutliple for example when replicating to multiple regions) is removed from the candidate blocks. |
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, but do you mind adding log/metric for when is the actual vertical compaction is triggered/enabled?
The difference between vertical and offline deduplication is well described many times already but once again:
- Strictly same timestamps vs realistically different scrape times.
- External-label aware deduplication.
It looks to me that actually offline deduplication should fix all cases indeed and this PR is a temporary solution working only for Cortex ingesters. For data replicated by remote write receiver we still ensure different external labels, so this does not help us out of the box.
Since the change is not very disruptive LGTM, but I think we need to take a greater look on #1276 🙈 @smalldirector who is doing amazing work on maintaining the branch with the offline dedup.
@smalldirector by any chance do you have any feedback on running your code for longer time? My assumption was that you already use it on production, or not? (: Also commented on that PR on the way we can move forward.
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Signed-off-by: Marco Pracucci <marco@pracucci.com>
c3770d9
to
7c15a0f
Compare
@brancz I see your point. What do you think if we keep the two things separated, and I work on it in a separate PR? I would like to gather some specs first, while we may move on with this PR to unlock the compactor on the Cortex side.
@bwplotka Makes sense. Now an example of compaction-related metrics is:
About the log there's already a log by TSDB compactor (see below), so I've just added an extra key-value pair to the "compacted blocks" debug log, but I'm open to suggestions.
What's your take? |
The failing tests looks unrelated. Please advise in case I've misread it. |
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 👍
Rerunning workflow for you. Thanks for metrics, this should do. Mentioned entry is fine as well. (: |
In Cortex, we're currently working on an experimental TSDB-storage layer based on Thanos 🎉❤️. The next step would be introducing the Thanos compactor in Cortex too, but to do that we would need a way to allow vertical compaction (due to how the replication works, in Cortex we have overlapping blocks).
According to our experiments, enabling vertical compaction is just a matter of disabling the checks done by Thanos to make sure blocks don't overlap. In this PR I'm suggesting to introduce an internal option (not exposed to Thanos users) to allow Cortex enabling it.
Changes
Verification
Manual tests.