Skip to content

Commit

Permalink
adds the ability to read chunkFormatV3 while writing v2 (#2984)
Browse files Browse the repository at this point in the history
(cherry picked from commit a8af1c0)
  • Loading branch information
owen-d authored and slim-bean committed Dec 10, 2020
1 parent fbf1790 commit 35a627d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/chunkenc/memchunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func NewMemChunk(enc Encoding, blockSize, targetSize int) *MemChunk {
blocks: []block{},

head: &headBlock{},
format: chunkFormatV3,
format: chunkFormatV2,

encoding: enc,
}
Expand Down
1 change: 1 addition & 0 deletions pkg/chunkenc/memchunk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ func TestRoundtripV3(t *testing.T) {
for _, enc := range testEncoding {
t.Run(enc.String(), func(t *testing.T) {
c := NewMemChunk(enc, testBlockSize, testTargetSize)
c.format = chunkFormatV3
_ = fillChunk(c)

b, err := c.Bytes()
Expand Down

0 comments on commit 35a627d

Please sign in to comment.