Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
Merge pull request #265 from simonpasquier/fix-nil-index-writer
Browse files Browse the repository at this point in the history
Fix panic on nil index writer
  • Loading branch information
gouthamve authored Jan 24, 2018
2 parents 467948f + 5d47710 commit ad0fdaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,10 @@ func (c *LeveledCompactor) write(dest string, meta *BlockMeta, blocks ...BlockRe
}

indexw, err := index.NewWriter(filepath.Join(tmp, indexFilename))
meta.Version = indexw.Version
if err != nil {
return errors.Wrap(err, "open index writer")
}
meta.Version = indexw.Version

if err := c.populateBlock(blocks, meta, indexw, chunkw); err != nil {
return errors.Wrap(err, "write compaction")
Expand Down

0 comments on commit ad0fdaf

Please sign in to comment.