mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Refactor
Signed-off-by: Carrie Edwards <edwrdscarrie@gmail.com>
This commit is contained in:
parent
e0d7cef545
commit
7e020bb4e9
|
@ -940,7 +940,7 @@ func (a *headAppender) Commit() (err error) {
|
||||||
// !ok means there are no markers collected for these samples yet. So we first flush the samples
|
// !ok means there are no markers collected for these samples yet. So we first flush the samples
|
||||||
// before setting this m-map marker.
|
// before setting this m-map marker.
|
||||||
|
|
||||||
// r != 0 means we have already m-mapped a chunk for this series in the same Commit().
|
// r != nil means we have already m-mapped a chunk for this series in the same Commit().
|
||||||
// Hence, before we m-map again, we should add the samples and m-map markers
|
// Hence, before we m-map again, we should add the samples and m-map markers
|
||||||
// seen till now to the WBL records.
|
// seen till now to the WBL records.
|
||||||
collectOOORecords()
|
collectOOORecords()
|
||||||
|
|
|
@ -118,8 +118,8 @@ func (oh *OOOHeadIndexReader) series(ref storage.SeriesRef, builder *labels.Scra
|
||||||
addChunk(c.minTime, c.maxTime, ref, chk.chunk)
|
addChunk(c.minTime, c.maxTime, ref, chk.chunk)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var enc chunkenc.Chunk
|
var emptyChunk chunkenc.Chunk
|
||||||
addChunk(c.minTime, c.maxTime, ref, enc)
|
addChunk(c.minTime, c.maxTime, ref, emptyChunk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue