Skip to content

Use CopyTo when resetting histogram in stats iterator#14624

Merged
bboreham merged 1 commit intorelease-2.54from
backport-pr14538-to-2.54
Aug 14, 2024
Merged

Use CopyTo when resetting histogram in stats iterator#14624
bboreham merged 1 commit intorelease-2.54from
backport-pr14538-to-2.54

Conversation

@krajorama
Copy link
Copy Markdown
Member

Backport of #14538

* [BUGFIX] PromQL: fix native histogram memory corruption when using histogram_count or histogram_sum.

The histogram stats iterator does not fully clear the histogram object
and is not resilient to new fields being added to the histogram type.

To resolve the issue, the commit uses the CopyTo methods which should
be future proof to new fields being added.

Signed-off-by: Filip Petkovski <[email protected]>
@krajorama krajorama requested a review from roidelapluie as a code owner August 8, 2024 07:09
@beorn7
Copy link
Copy Markdown
Member

beorn7 commented Aug 13, 2024

Assigning to @bboreham as the 2.54 release shepherd.

@beorn7 beorn7 requested a review from bboreham August 13, 2024 21:08
@bboreham bboreham merged commit 26977b5 into release-2.54 Aug 14, 2024
@bboreham bboreham deleted the backport-pr14538-to-2.54 branch August 14, 2024 14:19
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.

4 participants