mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
Merge pull request #7550 from krasi-georgiev/panic-head-chunk
no panic the head memseries has chunks in it
This commit is contained in:
commit
d6763acd60
|
@ -2208,10 +2208,8 @@ func (s *memSeries) iterator(id int, isoState *isolationState, chunkDiskMapper *
|
|||
previousSamples += int(d.numSamples)
|
||||
}
|
||||
}
|
||||
// mmappedChunks does not contain the last chunk. Hence check it separately.
|
||||
if len(s.mmappedChunks) < ix {
|
||||
previousSamples += s.headChunk.chunk.NumSamples()
|
||||
} else {
|
||||
|
||||
if s.headChunk != nil {
|
||||
totalSamples += s.headChunk.chunk.NumSamples()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue