mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 22:19:40 -08:00
storage: Increase persist watermark before calling append
The append call may reuse cds, and thus change its len. (In practice, this wouldn't happen as cds should have len==cap. Still, the previous order of lines was problematic.)
This commit is contained in:
parent
75282b27ba
commit
244a65fb29
|
@ -464,9 +464,9 @@ func (s *memorySeries) preloadChunksForRange(
|
|||
fp, s.chunkDescsOffset, len(cds),
|
||||
)
|
||||
}
|
||||
s.persistWatermark += len(cds)
|
||||
s.chunkDescs = append(cds, s.chunkDescs...)
|
||||
s.chunkDescsOffset = 0
|
||||
s.persistWatermark += len(cds)
|
||||
if len(s.chunkDescs) > 0 {
|
||||
firstChunkDescTime = s.chunkDescs[0].FirstTime()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue