Skip to content

Commit

Permalink
Merge pull request prometheus#13862 from nicolastakashi/refactor/movi…
Browse files Browse the repository at this point in the history
…ng-mergedOOOChunks-struct

[refactor] moving mergedOOOChunks to ooo_head_read
  • Loading branch information
ArthurSens committed Mar 29, 2024
2 parents 6a66f1f + 79d6750 commit b51bbdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions tsdb/head_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,13 +582,6 @@ func (s *memSeries) oooMergedChunks(meta chunks.Meta, cdm *chunks.ChunkDiskMappe
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 {
return storage.ChainSampleIteratorFromIterables(iterator, o.chunkIterables)
}
Expand Down
7 changes: 7 additions & 0 deletions tsdb/ooo_head_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ type OOOHeadIndexReader struct {
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 {
hr := &headIndexReader{
head: head,
Expand Down

0 comments on commit b51bbdd

Please sign in to comment.