-
Notifications
You must be signed in to change notification settings - Fork 2.2k
query: Fix counter resets for chain deduplication algorithm #8176
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michał Mazur <mmazur.box@gmail.com>
hey @yeya24 , @MichaHoffmann |
pkg/query/iter.go
Outdated
aggrs []storepb.Aggr | ||
mint, maxt int64 | ||
aggrs []storepb.Aggr | ||
deduplicationFunc string |
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.
Can we call it dedupAlgo?
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.
hey @MichaHoffmann
Thanks for looking at it.
deduplicationFunc is already used in a few places since #7808
Originally, to stay in sync with compactor's --deduplication.func.
At the time I didn't want to propose any bigger refactoring or code duplication for an experimental feature. Still, I don't like how that configuration spread out. Maybe, it can be refactored later on, e.g. with the removal of the experimental label. Till then I'd prefer to stay with the same name in all places, WDYT?
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.
Thanks. LGTM
How does this work for downsampled counter aggr chunk? Counter aggr chunk needs to use ApplyCounterReset iterator. |
A good question, it does not work in all cases. Counter aggr chunks come only from stores after the downsampling. So, there may be a need for overlaps removal for chunks coming from both receivers, stores. Let me know, if you seen any error in my assumptions. Honestly, I missed that part in the first PR🤦. And as 0.38 is closing, I'd like to fix the issue for receivers at least. |
Since this flag is experimental i dont mind if we merge this and followup with fixes later |
I think deduplication is not an issue but
I wonder how |
If chain deduplication is assumed to only work with receivers but not other types of chunks I am wondering if it is really usable. At least, we should document it so that users are aware of the issue and should only use it to query for receiver only data |
I expect it to work in all cases where are no overlap between raw and counter chunks. I'm working on a test that would verify it. If it's the case then still you're right that it should be documented. |
@yeya24 You have been right on counters, adjusting is required even between aggregated chunks. The last commit contains a new approach - chain dedup on a chunk level. I'm changing this PR to draft as the code is not yet cleaned up, necessary tests are missing and the change has been verified only on synthetic data. Still, I'd appreciate any comments. |
It's a fix to a not yet released feature.
Changes
Fix counter resets handling for
chain
deduplication algorithm by not applying resets on series replicas.The feature issue: #7807
Verification
Added a new e2e test.