Browse Source

Merge pull request #14663 from aknuds1/arve/promql-comment

PromQL engine: Fix comment regarding non-nil histogram pointer
pull/13599/merge
Arve Knudsen 3 months ago committed by GitHub
parent
commit
6f1fd4be96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      promql/engine.go

2
promql/engine.go

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

Loading…
Cancel
Save