diff --git a/internal/store/block/file/append.go b/internal/store/block/file/append.go index 14ada2705..dab252451 100644 --- a/internal/store/block/file/append.go +++ b/internal/store/block/file/append.go @@ -63,7 +63,7 @@ func (b *Block) NewAppendContext(last *block.Entry) block.AppendContext { full = 1 } return &appendContext{ - offset: last.Offset + uint32(len(last.Payload)), + offset: last.Offset + uint32(last.Size()), num: last.Index + 1, full: full, } @@ -196,6 +196,7 @@ func (b *Block) checkEntries(ctx context.Context, entries []block.Entry) error { "blockID": b.id, "offset": offset, "wo": b.actx.offset, + "index": entries[0].Index, }) return errors.ErrInternal }