Browse Source

Merge pull request #7550 from krasi-georgiev/panic-head-chunk

no panic the head memseries has chunks in it
pull/7621/head
Björn Rabenstein 4 years ago committed by GitHub
parent
commit
d6763acd60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      tsdb/head.go

6
tsdb/head.go

@ -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…
Cancel
Save