From a018a7ef5379cd8969dee4f36b091d0088286502 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Thu, 17 Aug 2023 07:42:18 +0100 Subject: [PATCH] storage: simplify Seek on BufferedSeriesIterator Small tweak to call a simpler method Signed-off-by: Bryan Boreham --- storage/buffer.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/storage/buffer.go b/storage/buffer.go index 38f559103..50810b818 100644 --- a/storage/buffer.go +++ b/storage/buffer.go @@ -92,12 +92,8 @@ func (b *BufferedSeriesIterator) Seek(t int64) chunkenc.ValueType { switch b.valueType { case chunkenc.ValNone: return chunkenc.ValNone - case chunkenc.ValFloat: - b.lastTime, _ = b.At() - case chunkenc.ValHistogram: - b.lastTime, _ = b.AtHistogram() - case chunkenc.ValFloatHistogram: - b.lastTime, _ = b.AtFloatHistogram() + case chunkenc.ValFloat, chunkenc.ValHistogram, chunkenc.ValFloatHistogram: + b.lastTime = b.AtT() default: panic(fmt.Errorf("BufferedSeriesIterator: unknown value type %v", b.valueType)) }