From a773d3daad129e509faf00d408778b7750b72fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Tue, 10 Mar 2026 16:23:08 +0100 Subject: [PATCH] replace stray xoroptst words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: György Krajcsovits --- tsdb/chunkenc/chunk.go | 10 +++++----- tsdb/chunkenc/xor2.go | 2 +- tsdb/db_append_v2_test.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tsdb/chunkenc/chunk.go b/tsdb/chunkenc/chunk.go index b3b33df34b..d1b14568ef 100644 --- a/tsdb/chunkenc/chunk.go +++ b/tsdb/chunkenc/chunk.go @@ -77,7 +77,7 @@ type Chunk interface { // Encoding returns the encoding type of the chunk. // If the chunk is capable of storing ST (start timestamps), it should - // return the appropriate encoding type (e.g., EncXOROptST). + // return the appropriate encoding type (e.g., EncXOR2). Encoding() Encoding // Appender returns an appender to append samples to the chunk. @@ -298,7 +298,7 @@ type pool struct { xor sync.Pool histogram sync.Pool floatHistogram sync.Pool - xoroptst sync.Pool + xo2 sync.Pool } // NewPool returns a new pool. @@ -319,7 +319,7 @@ func NewPool() Pool { return &FloatHistogramChunk{b: bstream{}} }, }, - xoroptst: sync.Pool{ + xo2: sync.Pool{ New: func() any { return &XOR2Chunk{b: bstream{}} }, @@ -337,7 +337,7 @@ func (p *pool) Get(e Encoding, b []byte) (Chunk, error) { case EncFloatHistogram: c = p.floatHistogram.Get().(*FloatHistogramChunk) case EncXOR2: - c = p.xoroptst.Get().(*XOR2Chunk) + c = p.xo2.Get().(*XOR2Chunk) default: return nil, fmt.Errorf("invalid chunk encoding %q", e) } @@ -361,7 +361,7 @@ func (p *pool) Put(c Chunk) error { sp = &p.floatHistogram case EncXOR2: _, ok = c.(*XOR2Chunk) - sp = &p.xoroptst + sp = &p.xo2 default: return fmt.Errorf("invalid chunk encoding %q", c.Encoding()) } diff --git a/tsdb/chunkenc/xor2.go b/tsdb/chunkenc/xor2.go index 3dd3241180..2d5cc2b542 100644 --- a/tsdb/chunkenc/xor2.go +++ b/tsdb/chunkenc/xor2.go @@ -101,7 +101,7 @@ func readSTHeader(b []byte) (firstSTKnown bool, firstSTChangeOn uint8) { } // XOR2Chunk holds XOR2 encoded samples with optional start -// timestamp per chunk or per sample. See XOROptST for the ST header format. +// timestamp per chunk or per sample. type XOR2Chunk struct { b bstream } diff --git a/tsdb/db_append_v2_test.go b/tsdb/db_append_v2_test.go index 1b05a1280e..149331b438 100644 --- a/tsdb/db_append_v2_test.go +++ b/tsdb/db_append_v2_test.go @@ -7505,7 +7505,7 @@ func TestAbortBlockCompactions_AppendV2(t *testing.T) { } // TestCompactHeadWithSTStorage_AppendV2 ensures that when EnableSTStorage is true, -// compacted blocks contain chunks with EncXOROptST encoding for float samples. +// compacted blocks contain chunks with EncXOR2 encoding for float samples. func TestCompactHeadWithSTStorage_AppendV2(t *testing.T) { t.Parallel()