From dc6b068c674d6f4cd9d35abd88392f2aa82407fa Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 5 Jul 2021 15:57:47 +0300 Subject: [PATCH] bugfix: only bump numRead when all fields are successfully read Signed-off-by: Dieter Plaetinck --- tsdb/chunkenc/histo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsdb/chunkenc/histo.go b/tsdb/chunkenc/histo.go index 010e7e3580..ce6bd33dbb 100644 --- a/tsdb/chunkenc/histo.go +++ b/tsdb/chunkenc/histo.go @@ -632,6 +632,7 @@ func (it *histoIterator) Next() bool { it.negbuckets[i] = it.negbuckets[i] + delta } + it.numRead++ return true } @@ -684,6 +685,7 @@ func (it *histoIterator) Next() bool { it.negbuckets[i] = it.negbuckets[i] + it.negbucketsDelta[i] } + it.numRead++ return true } @@ -752,6 +754,5 @@ func (it *histoIterator) readSum() bool { it.sum = math.Float64frombits(vbits) } - it.numRead++ return true }