Skip to content

Conversation

pr00se
Copy link
Contributor

@pr00se pr00se commented Mar 19, 2025

For float and histogram samples (and tombstones) we check the timestamp of the record against the minValidTime of the head before attempting any other processing, skipping the record entirely if minValidTime is greater. For exemplars, we don't do this check until after we try to match the exemplar record to a series (possibly logging unknown series references for exemplars that we're going to skip processing anyway).

This PR moves the timestamp check to be the first thing done when processing exemplar records, matching the other record types.

@pr00se pr00se requested a review from jesusvazquez as a code owner March 19, 2025 20:27
Copy link
Member

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

Seems a valid improvement, thanks!

@bboreham bboreham merged commit eac3715 into prometheus:main Mar 20, 2025
27 checks passed
@pr00se pr00se deleted the drop-exemplars-sooner branch March 20, 2025 14:12
zenador pushed a commit to zenador/prometheus that referenced this pull request Jun 2, 2025
TSDB: don't process exemplars older than minValidTime during WAL replay
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.

2 participants