Skip to content

Commit 6fcadae

Browse files
committed
db: fix blob file rewrite bug
Fix bug in which during blob file rewriting, the pending BlockID was not updated.
1 parent 65f3f9b commit 6fcadae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

blob_rewrite.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ func (rw *blobFileRewriter) Rewrite(ctx context.Context) (blob.FileWriterStats,
466466
if err != nil {
467467
return blob.FileWriterStats{}, err
468468
}
469+
pending = blockValues{blockID: nextBlock.BlockID, liveValueIDs: pending.liveValueIDs[:0]}
469470
}
470471
// Update the accumulated encoding for this block.
471472
pending.valuesSize += nextBlock.ValuesSize

0 commit comments

Comments
 (0)