From 59d77ff16d212d0165cac671affe254586a18f11 Mon Sep 17 00:00:00 2001 From: Ganesh Vernekar Date: Tue, 5 Oct 2021 12:57:49 +0530 Subject: [PATCH] Fix build Signed-off-by: Ganesh Vernekar --- tsdb/querier.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tsdb/querier.go b/tsdb/querier.go index c5d5f2bae..fd46e591f 100644 --- a/tsdb/querier.go +++ b/tsdb/querier.go @@ -717,12 +717,16 @@ func (p *populateWithDelChunkSeriesIterator) Next() bool { h histogram.SparseHistogram ) if p.currDelIter.ChunkEncoding() == chunkenc.EncSHS { + counterReset := false + if hc, ok := p.currChkMeta.Chunk.(*chunkenc.HistoChunk); ok { + counterReset = hc.CounterReset() + } t, h = p.currDelIter.AtHistogram() p.curr.MinTime = t - app.AppendHistogram(t, h.Copy()) + app.AppendHistogram(t, h.Copy(), counterReset) for p.currDelIter.Next() { t, h = p.currDelIter.AtHistogram() - app.AppendHistogram(t, h.Copy()) + app.AppendHistogram(t, h.Copy(), false) } } else { t, v = p.currDelIter.At()