From 59bd0a2a3018e98872c6c786822f73a2842e1fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Wed, 4 Feb 2026 21:20:32 +0100 Subject: [PATCH] Reduce size of first st stored a little 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, 2 insertions(+), 2 deletions(-) diff --git a/tsdb/chunkenc/xoroptst.go b/tsdb/chunkenc/xoroptst.go index 95c40c3a92..71bb195d0a 100644 --- a/tsdb/chunkenc/xoroptst.go +++ b/tsdb/chunkenc/xoroptst.go @@ -327,7 +327,7 @@ func (a *xorOptSTAppender) Append(st, t int64, v float64) { a.b.writeBits(math.Float64bits(v), 64) // Write ST. - for _, b := range buf[:binary.PutVarint(buf, st)] { + for _, b := range buf[:binary.PutVarint(buf, t-st)] { a.b.writeByte(b) } a.firstSTKnown = true @@ -508,7 +508,7 @@ func (it *xorOptSTtIterator) Next() ValueType { if err != nil { return it.retErr(err) } - it.st = st + it.st = t - st } it.numRead++