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/agent: port grafana/agent#676 #10587

Merged
merged 2 commits into from
Apr 14, 2022
Merged

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Apr 13, 2022

grafana/agent#676 fixed an issue where a loading a WAL with multiple segments may result in ref ID collision. The starting ref ID for new series should be set to the highest ref ID across all series records from all WAL segments.

This fixes an issue where the starting ref ID was incorrectly set to the highest ref ID found in the newest segment, which may not have any ref IDs at all if no series records have been appended to it yet. This eventually leads to ref ID collision if the starting ref ID eventually collides with an active series.

This is related to #10445, but may not fix it, since it seems to exhibit different behaviors than what was originally reported in grafana/agent#675 (e.g., the original Grafana Agent report didn't mention values correcting themselves over time).

Signed-off-by: Robert Fratto robertfratto@gmail.com

@rfratto rfratto requested a review from codesome as a code owner April 13, 2022 14:56
@roidelapluie
Copy link
Member

Can you please rebase this to the release-2.35 branch?

@rfratto rfratto changed the base branch from main to release-2.35 April 13, 2022 15:11
grafana/agent#676 fixed an issue where a loading a WAL with multiple
segments may result in ref ID collision. The starting ref ID for new
series should be set to the highest ref ID across all series records
from all WAL segments.

This fixes an issue where the starting ref ID was incorrectly set to the
highest ref ID found in the newest segment, which may not have any ref
IDs at all if no series records have been appended to it yet.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
Signed-off-by: Robert Fratto <robertfratto@gmail.com>
@rfratto
Copy link
Member Author

rfratto commented Apr 13, 2022

Can you please rebase this to the release-2.35 branch?

Done 👍

@roidelapluie
Copy link
Member

Thanks!

cc @Nexucis

@Nexucis
Copy link
Member

Nexucis commented Apr 14, 2022

👍

@Nexucis Nexucis merged commit 286dfc7 into release-2.35 Apr 14, 2022
@Nexucis Nexucis deleted the port-grafana-agent-pr-676 branch April 14, 2022 08:27
roidelapluie pushed a commit to roidelapluie/prometheus that referenced this pull request Jun 22, 2022
* tsdb/agent: port grafana/agent#676

grafana/agent#676 fixed an issue where a loading a WAL with multiple
segments may result in ref ID collision. The starting ref ID for new
series should be set to the highest ref ID across all series records
from all WAL segments.

This fixes an issue where the starting ref ID was incorrectly set to the
highest ref ID found in the newest segment, which may not have any ref
IDs at all if no series records have been appended to it yet.

Signed-off-by: Robert Fratto <robertfratto@gmail.com>

* tsdb/agent: update terminology (s/ref ID/nextRef)

Signed-off-by: Robert Fratto <robertfratto@gmail.com>
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.

None yet

3 participants