diff --git a/statistics/histogram.go b/statistics/histogram.go index 203cf0b83f02a..cfa9db65200df 100644 --- a/statistics/histogram.go +++ b/statistics/histogram.go @@ -306,6 +306,7 @@ func (hg *Histogram) BinarySearchRemoveVal(valCntPairs TopNMeta) { if hg.Buckets[midIdx].Count < 0 { hg.Buckets[midIdx].Count = 0 } + break } }