Browse Source

[refactor] moving mergedOOOChunks Iterator (#13881)

Signed-off-by: Nicolas Takashi <nicolas.tcs@hotmail.com>
pull/13885/head
Nicolas Takashi 8 months ago committed by GitHub
parent
commit
8125634086
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      tsdb/head_read.go
  2. 4
      tsdb/ooo_head_read.go

4
tsdb/head_read.go

@ -582,10 +582,6 @@ func (s *memSeries) oooMergedChunks(meta chunks.Meta, cdm *chunks.ChunkDiskMappe
return mc, nil return mc, nil
} }
func (o mergedOOOChunks) Iterator(iterator chunkenc.Iterator) chunkenc.Iterator {
return storage.ChainSampleIteratorFromIterables(iterator, o.chunkIterables)
}
var _ chunkenc.Iterable = &boundedIterable{} var _ chunkenc.Iterable = &boundedIterable{}
// boundedIterable is an implementation of chunkenc.Iterable that uses a // boundedIterable is an implementation of chunkenc.Iterable that uses a

4
tsdb/ooo_head_read.go

@ -49,6 +49,10 @@ type mergedOOOChunks struct {
chunkIterables []chunkenc.Iterable 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 { func NewOOOHeadIndexReader(head *Head, mint, maxt int64, lastGarbageCollectedMmapRef chunks.ChunkDiskMapperRef) *OOOHeadIndexReader {
hr := &headIndexReader{ hr := &headIndexReader{
head: head, head: head,

Loading…
Cancel
Save