Fixes iota unexpected behaviour with bytes for chunk encoding. (#2945)

* Fixes iota unexpected behaviour with bytes for chunk encoding.

This was introducing incompatibilities since iota with bytes starts at 2.
Seems like a weird conversion between iota int and byte.

This can currenlty corrupt chunks, and previous chunks are not decodable.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>

* With iota correclty this time.

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
pull/2903/head
Cyril Tovena 5 years ago committed by GitHub
parent 14a5fda15b
commit fa7ea9cc2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      pkg/chunkenc/memchunk.go

@ -24,13 +24,13 @@ import (
)
const (
blocksPerChunk = 10
maxLineLength = 1024 * 1024 * 1024
_ byte = iota
chunkFormatV1
chunkFormatV2
chunkFormatV3
blocksPerChunk = 10
maxLineLength = 1024 * 1024 * 1024
)
var (

Loading…
Cancel
Save