Skip to content

Commit

Permalink
Remove block backwards compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Haudum <[email protected]>
  • Loading branch information
chaudum committed Sep 19, 2024
1 parent 8870a90 commit 9b8bb26
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions pkg/storage/bloom/v1/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ func (s Schema) Version() Version {

// byte length
func (s Schema) Len() int {
// magic number + version + encoding + ngram length + ngram skip
return 4 + 1 + 1 + 8 + 8
// magic number + version + encoding
return 4 + 1 + 1
}

func (s *Schema) DecompressorPool() compression.ReaderPool {
Expand All @@ -80,9 +80,6 @@ func (s *Schema) Encode(enc *encoding.Encbuf) {
enc.PutBE32(magicNumber)
enc.PutByte(byte(s.version))
enc.PutByte(byte(s.encoding))
// kept to keep compatibility
enc.PutBE64(0) // previously n-gram length
enc.PutBE64(0) // previously n-gram skip

}

Expand Down Expand Up @@ -113,9 +110,5 @@ func (s *Schema) Decode(dec *encoding.Decbuf) error {
return errors.Wrap(err, "parsing encoding")
}

// kept to keep compatibility
_ = dec.Be64() // previously n-gram length
_ = dec.Be64() // previously n-gram skip

return dec.Err()
}

0 comments on commit 9b8bb26

Please sign in to comment.