mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
Unpin any already loaded chunks upon preloading error.
Change-Id: Ib451136e3ef21bce8b814c21b66eaab727ab341b
This commit is contained in:
parent
fd01d07589
commit
15929eece2
|
@ -226,7 +226,12 @@ func (s *memorySeries) preloadChunks(indexes []int, p Persistence) (chunkDescs,
|
|||
fp := s.metric.Fingerprint()
|
||||
chunks, err := p.LoadChunks(fp, loadIndexes)
|
||||
if err != nil {
|
||||
// TODO: unpin all chunks that were already loaded before.
|
||||
// Unpin any pinned chunks that were already loaded.
|
||||
for _, cd := range pinnedChunkDescs {
|
||||
if cd.chunk != nil {
|
||||
cd.unpin()
|
||||
}
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
for i, c := range chunks {
|
||||
|
|
Loading…
Reference in a new issue