From 2a2e2ed28bc9f1f9205e874ed1be705e765ecb9b Mon Sep 17 00:00:00 2001 From: machine424 Date: Wed, 20 Mar 2024 14:09:21 +0100 Subject: [PATCH] chore(tsdb): set the wbl to nil as well in DBReadOnly.loadDataAsQueryable Signed-off-by: machine424 --- tsdb/db.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsdb/db.go b/tsdb/db.go index e49c5811d..28cecde4f 100644 --- a/tsdb/db.go +++ b/tsdb/db.go @@ -529,9 +529,10 @@ func (db *DBReadOnly) loadDataAsQueryable(maxt int64) (storage.SampleAndChunkQue if err := head.Init(maxBlockTime); err != nil { return nil, fmt.Errorf("read WAL: %w", err) } - // Set the wal to nil to disable all wal operations. + // Set the wal and the wbl to nil to disable related operations. // This is mainly to avoid blocking when closing the head. head.wal = nil + head.wbl = nil } db.closers = append(db.closers, head)