diff --git a/tsdb/head_append.go b/tsdb/head_append.go index 4a594f314..c6898c10c 100644 --- a/tsdb/head_append.go +++ b/tsdb/head_append.go @@ -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 // 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 // seen till now to the WBL records. collectOOORecords() diff --git a/tsdb/ooo_head_read.go b/tsdb/ooo_head_read.go index aedda49dd..14d3724e8 100644 --- a/tsdb/ooo_head_read.go +++ b/tsdb/ooo_head_read.go @@ -118,8 +118,8 @@ func (oh *OOOHeadIndexReader) series(ref storage.SeriesRef, builder *labels.Scra addChunk(c.minTime, c.maxTime, ref, chk.chunk) } } else { - var enc chunkenc.Chunk - addChunk(c.minTime, c.maxTime, ref, enc) + var emptyChunk chunkenc.Chunk + addChunk(c.minTime, c.maxTime, ref, emptyChunk) } } }