Skip to content

Commit

Permalink
handle empty chunk
Browse files Browse the repository at this point in the history
Signed-off-by: shuaizhang <[email protected]>
  • Loading branch information
shuaizhang committed Nov 13, 2019
1 parent 61afd00 commit ae51c4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/compact/dedup/merger.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ func (rm *replicaMerger) write(readers []*blockReader, blockDir string, meta *me
continue
}

if err := writer.WriteSeries(cs.lset, cs.chks); err != nil {
return err
if len(cs.chks) > 0 {
if err := writer.WriteSeries(cs.lset, cs.chks); err != nil {
return err
}
}

for i, v := range buf {
Expand Down

0 comments on commit ae51c4d

Please sign in to comment.