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

TSDB: Always drop 'quiet zeros' if out-of-order #773

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented Nov 29, 2024

Follow-up to #766

"Quiet Zeros" are used to insert the starting sample for a counter. If the zero is out-of-order then we already have some data for the series, and we should have already handled the start value, so just drop the quiet zero.

There is one case not handled: if we receive (e.g. over OTLP) the second sample for a series before the first, and the first sample is nonzero and has time == startTime, then we will have inserted a zero erroneously at the start time. If OOO is enabled we will then insert the correct value, and it is undetermined which value will come out at query time. This case is not made worse by this PR.

"Quiet Zeros" are used to insert the starting sample for a counter.
If the zero is out-of-order then we already have some data for the
series, and we should have already handled the start value, so just drop
the quiet zero.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

3 participants