mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 09:02:53 +00: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)
|
previousSamples += int(d.numSamples)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// mmappedChunks does not contain the last chunk. Hence check it separately.
|
|
||||||
if len(s.mmappedChunks) < ix {
|
if s.headChunk != nil {
|
||||||
previousSamples += s.headChunk.chunk.NumSamples()
|
|
||||||
} else {
|
|
||||||
totalSamples += s.headChunk.chunk.NumSamples()
|
totalSamples += s.headChunk.chunk.NumSamples()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user