From 812563408683d7c4e5048a6ebcda3d3eb802fe00 Mon Sep 17 00:00:00 2001 From: Nicolas Takashi Date: Wed, 3 Apr 2024 09:14:34 +0100 Subject: [PATCH] [refactor] moving mergedOOOChunks Iterator (#13881) Signed-off-by: Nicolas Takashi --- tsdb/head_read.go | 4 ---- tsdb/ooo_head_read.go | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tsdb/head_read.go b/tsdb/head_read.go index 0ad885da2..45bbc81f1 100644 --- a/tsdb/head_read.go +++ b/tsdb/head_read.go @@ -582,10 +582,6 @@ func (s *memSeries) oooMergedChunks(meta chunks.Meta, cdm *chunks.ChunkDiskMappe return mc, nil } -func (o mergedOOOChunks) Iterator(iterator chunkenc.Iterator) chunkenc.Iterator { - return storage.ChainSampleIteratorFromIterables(iterator, o.chunkIterables) -} - var _ chunkenc.Iterable = &boundedIterable{} // boundedIterable is an implementation of chunkenc.Iterable that uses a diff --git a/tsdb/ooo_head_read.go b/tsdb/ooo_head_read.go index 4985ebb98..ed0b3fd22 100644 --- a/tsdb/ooo_head_read.go +++ b/tsdb/ooo_head_read.go @@ -49,6 +49,10 @@ type mergedOOOChunks struct { chunkIterables []chunkenc.Iterable } +func (o mergedOOOChunks) Iterator(iterator chunkenc.Iterator) chunkenc.Iterator { + return storage.ChainSampleIteratorFromIterables(iterator, o.chunkIterables) +} + func NewOOOHeadIndexReader(head *Head, mint, maxt int64, lastGarbageCollectedMmapRef chunks.ChunkDiskMapperRef) *OOOHeadIndexReader { hr := &headIndexReader{ head: head,