Merge pull request #13862 from nicolastakashi/refactor/moving-mergedOOOChunks-struct
[refactor] moving mergedOOOChunks to ooo_head_read
This commit is contained in:
commit
b51bbdd7ad
|
@ -582,13 +582,6 @@ func (s *memSeries) oooMergedChunks(meta chunks.Meta, cdm *chunks.ChunkDiskMappe
|
||||||
return mc, nil
|
return mc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ chunkenc.Iterable = &mergedOOOChunks{}
|
|
||||||
|
|
||||||
// mergedOOOChunks holds the list of iterables for overlapping chunks.
|
|
||||||
type mergedOOOChunks struct {
|
|
||||||
chunkIterables []chunkenc.Iterable
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o mergedOOOChunks) Iterator(iterator chunkenc.Iterator) chunkenc.Iterator {
|
func (o mergedOOOChunks) Iterator(iterator chunkenc.Iterator) chunkenc.Iterator {
|
||||||
return storage.ChainSampleIteratorFromIterables(iterator, o.chunkIterables)
|
return storage.ChainSampleIteratorFromIterables(iterator, o.chunkIterables)
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,13 @@ type OOOHeadIndexReader struct {
|
||||||
lastGarbageCollectedMmapRef chunks.ChunkDiskMapperRef
|
lastGarbageCollectedMmapRef chunks.ChunkDiskMapperRef
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _ chunkenc.Iterable = &mergedOOOChunks{}
|
||||||
|
|
||||||
|
// mergedOOOChunks holds the list of iterables for overlapping chunks.
|
||||||
|
type mergedOOOChunks struct {
|
||||||
|
chunkIterables []chunkenc.Iterable
|
||||||
|
}
|
||||||
|
|
||||||
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…
Reference in New Issue