Skip to content
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

fixing thanos querier dedup issue causing incorrect/high values when … #8085

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohaabduvisa
Copy link

Thanos querier rate/increase function creating huge spikes/incorrect results when deduplication is enabled

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Changes are made in overlapSplitSet Next function to filter out the prometheus replica/instance counter metric value whenever lower timestamps has higher values. The issue is explained in detail in #7623

Most of the chunks from different replicas are merged and few leftover separate chunks are returned from loser tree and the separate non merged chunks when fed to dedup.NewSeriesSet in querier.go doesn't have any effect. Hence the changes are made in dedup.NewOverlapSplit to filter out samples which has higher values at lower timestamps

Note: Current dedup bug was resulting in many false alerts breaching the treshold and hence it is very important to fix the dedup bug ASAP

Verification

Tests are being performed. Before this change rate function was returning result of 1200 for below samples. When the fix is applied rate function only result in 0.46 which is accurate

Dedup issue

304528 1731358720.447
304530 1731358725.97
304532 1731358750.447
304536 1731358780.447
304540 1731358810.447
304543 1731358816.021 -- This sample has been filtered after fix
304542 1731358816.028

replica 0
304531 1731358726.028
304535 1731358756.028
304539 1731358786.028
304542 1731358816.028

replica 1
304530 1731358725.97
304534 1731358755.97
304538 1731358785.97
304543 1731358816.021

replica 2
304528 1731358720.447
304532 1731358750.447
304536 1731358780.447
304540 1731358810.447

Please review the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant