Update promql/engine.go

Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
pull/14625/head
George Krajcsovits 4 months ago committed by György Krajcsovits
parent 1fb0ff7e45
commit 1d7fe4be5c

@ -2357,7 +2357,7 @@ loop:
histograms = append(histograms, HPoint{H: &histogram.FloatHistogram{}}) histograms = append(histograms, HPoint{H: &histogram.FloatHistogram{}})
} }
if histograms[n].H == nil { if histograms[n].H == nil {
// Initialize to non zero to AtFloatHistogram does a copy for sure. // Make sure to pass non zero H to AtFloatHistogram so that it does a deep-copy.
// Not an issue in the loop above since that uses an intermediate buffer. // Not an issue in the loop above since that uses an intermediate buffer.
histograms[n].H = &histogram.FloatHistogram{} histograms[n].H = &histogram.FloatHistogram{}
} }

Loading…
Cancel
Save