From ea8a5418fa51e26e685ba8c52fc0ddf6d2eb44ef Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Thu, 5 Sep 2024 16:42:45 +0200 Subject: [PATCH] fixup! fixup! fixup! Apply changes from code review Signed-off-by: Christian Haudum --- pkg/storage/bloom/v1/bloom_builder.go | 2 -- pkg/storage/bloom/v1/builder.go | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/pkg/storage/bloom/v1/bloom_builder.go b/pkg/storage/bloom/v1/bloom_builder.go index 2d75fc224d521..ea54ba248f7c4 100644 --- a/pkg/storage/bloom/v1/bloom_builder.go +++ b/pkg/storage/bloom/v1/bloom_builder.go @@ -46,8 +46,6 @@ func (b *BloomBlockBuilder) Append(bloom *Bloom) (BloomOffset, error) { } } - // version := b.opts.Schema.version - b.scratch.Reset() if err := bloom.Encode(b.scratch); err != nil { return BloomOffset{}, errors.Wrap(err, "encoding bloom") diff --git a/pkg/storage/bloom/v1/builder.go b/pkg/storage/bloom/v1/builder.go index c6c4a21ca64a5..3a61234a1b12a 100644 --- a/pkg/storage/bloom/v1/builder.go +++ b/pkg/storage/bloom/v1/builder.go @@ -66,18 +66,6 @@ func (b BlockOptions) Encode(enc *encoding.Encbuf) { enc.PutBE64(b.BlockSize) } -// func NewDefaultBlockOptions(maxBlockSizeBytes, maxBloomSizeBytes uint64) BlockOptions { -// opts := NewBlockOptionsFromSchema(Schema{ -// version: DefaultSchemaVersion, -// encoding: chunkenc.EncNone, -// nGramLength: 0, -// nGramSkip: 0, -// }) -// opts.BlockSize = maxBlockSizeBytes -// opts.UnencodedBlockOptions.MaxBloomSizeBytes = maxBloomSizeBytes -// return opts -// } - func NewBlockOptions(enc chunkenc.Encoding, nGramLength, nGramSkip, maxBlockSizeBytes, maxBloomSizeBytes uint64) BlockOptions { opts := NewBlockOptionsFromSchema(Schema{ version: CurrentSchemaVersion,