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

Fix last_over_time for native histograms #13474

Merged
merged 1 commit into from Jan 26, 2024

Conversation

fpetkovski
Copy link
Contributor

@fpetkovski fpetkovski commented Jan 26, 2024

The last_over_time retains a histogram sample without making a copy. This sample is now coming from the buffered iterator used for windowing functions, and can be reused for reading subsequent samples as the iterator progresses.

I would propose copying the sample in the last_over_time function, similar to how it is done for rate, sum_over_time and others.

Closes #13470.

The last_over_time retains a histogram sample without making a copy.
This sample is now coming from the buffered iterator used for windowing functions,
and can be reused for reading subsequent samples as the iterator progresses.

I would propose copying the sample in the last_over_time function, similar to
how it is done for rate, sum_over_time and others.

Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Copy link
Member

@krajorama krajorama left a comment

Choose a reason for hiding this comment

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

LGTM, tested myself

krajorama added a commit to grafana/mimir-prometheus that referenced this pull request Jan 26, 2024
To not hold up mimir-prometheus update
More discussion in CNCF chat:
https://cloud-native.slack.com/archives/C02KR205UMU/p1706198311136139

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
krajorama added a commit to grafana/mimir-prometheus that referenced this pull request Jan 26, 2024
Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

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

Thanks, will merge on green.

@beorn7
Copy link
Member

beorn7 commented Jan 26, 2024

/cc @Nexucis this is a bug fix we need in the release branch.

@beorn7 beorn7 enabled auto-merge January 26, 2024 18:13
@beorn7 beorn7 disabled auto-merge January 26, 2024 22:28
@beorn7 beorn7 merged commit 88d07c4 into prometheus:release-2.50 Jan 26, 2024
50 checks passed
@beorn7
Copy link
Member

beorn7 commented Jan 26, 2024

The build was lagging, but we don't depend on it here. Merged.

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