diff --git a/block_test.go b/block_test.go index 690cd07ad1..4ebb9685d0 100644 --- a/block_test.go +++ b/block_test.go @@ -42,7 +42,7 @@ func TestSetCompactionFailed(t *testing.T) { func createEmptyBlock(t *testing.T, dir string) *Block { testutil.Ok(t, os.MkdirAll(dir, 0777)) - testutil.Ok(t, writeMetaFile(dir, &BlockMeta{})) + testutil.Ok(t, writeMetaFile(dir, &BlockMeta{Version: 2})) ir, err := index.NewWriter(filepath.Join(dir, indexFilename)) testutil.Ok(t, err) diff --git a/index/index.go b/index/index.go index 3b7a09c39f..7decaa5176 100644 --- a/index/index.go +++ b/index/index.go @@ -168,6 +168,8 @@ func NewWriter(fn string) (*Writer, error) { symbols: make(map[string]uint32, 1<<13), seriesOffsets: make(map[uint64]uint64, 1<<16), crc32: newCRC32(), + + Version: 2, } if err := iw.writeMeta(); err != nil { return nil, err