From b2491c7cf7797ad54a0be80744d178ba6759de08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Fri, 6 Feb 2026 15:34:56 +0100 Subject: [PATCH] fix(chunkenc): bug in initializing appender on existing chunk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: György Krajcsovits --- tsdb/chunkenc/xoroptst.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tsdb/chunkenc/xoroptst.go b/tsdb/chunkenc/xoroptst.go index 71bb195d0a..b138ddbdf4 100644 --- a/tsdb/chunkenc/xoroptst.go +++ b/tsdb/chunkenc/xoroptst.go @@ -114,6 +114,10 @@ func (c *XorOptSTChunk) Appender() (Appender, error) { return nil, err } + // Set the bit position for continuing writes. + // The iterator's reader tracks how many bits remain unread in the last byte. + c.b.count = it.br.valid + a := &xorOptSTAppender{ b: &c.b, st: it.st,