From 7e020bb4e9e3bde3ce117a187809c8aea3d4fed4 Mon Sep 17 00:00:00 2001 From: Carrie Edwards Date: Mon, 15 Jul 2024 13:15:07 -0700 Subject: [PATCH] Refactor Signed-off-by: Carrie Edwards --- tsdb/head_append.go | 2 +- tsdb/ooo_head_read.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tsdb/head_append.go b/tsdb/head_append.go index 4a594f3142..c6898c10c8 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 aedda49dde..14d3724e8a 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) } } }