Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSeries lastSampleValue{,Set} is not set upon checkpoint recovery #2602
Comments
juliusv
added
area/stability
component/local storage
kind/bug
labels
Apr 7, 2017
juliusv
added a commit
to cortexproject/cortex
that referenced
this issue
Apr 7, 2017
juliusv
added a commit
to cortexproject/cortex
that referenced
this issue
Apr 7, 2017
juliusv
added a commit
to cortexproject/cortex
that referenced
this issue
Apr 7, 2017
juliusv
added a commit
to cortexproject/cortex
that referenced
this issue
Apr 7, 2017
This comment has been minimized.
This comment has been minimized.
|
Yes, that was deliberate back then, as we didn't want to change the checkpoint format just to enable this check. Explicitly retrieving the last sample from the last chunk of each series would be quite expensive and increase startup time. (At least that was the rationale back then.) |
tomwilkie
added a commit
to cortexproject/cortex
that referenced
this issue
Apr 8, 2017
This comment has been minimized.
This comment has been minimized.
|
Ah, good to know. I bet we're not aiming to fix this before the new storage then, so closing. |
juliusv
closed this
Apr 8, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 23, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
juliusv commentedApr 7, 2017
We do not set the series' lastSampleValue and lastSampleValueSet when recovering a series from the checkpoint upon startup: https://sourcegraph.com/github.com/prometheus/prometheus@acd72ae1a7bf62ef37f69830531666548ce40907/-/blob/storage/local/heads.go#L211:1-221:1
But we only do duplicate sample value detection correctly if this field is set: https://github.com/prometheus/prometheus/blob/master/storage/local/storage.go#L919-L920
Thus, when one restarts a Prometheus, a duplicate sample (that would normally be a noop) is now counted as a sample with equal timestamp, but different value.
/cc @beorn7