mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
Merge pull request #1798 from prometheus/beorn7/storage2
Crash recovery: Fix an edge case.
This commit is contained in:
commit
0622304244
|
@ -362,6 +362,10 @@ func (p *persistence) sanitizeSeries(
|
|||
)
|
||||
numMemChunkDescs.Sub(float64(keepIdx))
|
||||
atomic.AddInt64(&numMemChunks, int64(-keepIdx))
|
||||
if keepIdx == len(s.chunkDescs) {
|
||||
// No chunks from series file left, head chunk is evicted, so declare it closed.
|
||||
s.headChunkClosed = true
|
||||
}
|
||||
s.chunkDescs = append(cds, s.chunkDescs[keepIdx:]...)
|
||||
return fp, true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue