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
  • Loading branch information
owen-d authored Dec 1, 2020
1 parent 410b9d9 commit a8af1c0
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 @@ -253,7 +253,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 @@ -265,6 +265,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 a8af1c0

Please sign in to comment.