mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -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()
|
fp := s.metric.Fingerprint()
|
||||||
chunks, err := p.LoadChunks(fp, loadIndexes)
|
chunks, err := p.LoadChunks(fp, loadIndexes)
|
||||||
if err != nil {
|
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
|
return nil, err
|
||||||
}
|
}
|
||||||
for i, c := range chunks {
|
for i, c := range chunks {
|
||||||
|
|
Loading…
Reference in a new issue