diff --git a/pkg/replica/diff_disk.go b/pkg/replica/diff_disk.go index 64405ebff..69aae608a 100644 --- a/pkg/replica/diff_disk.go +++ b/pkg/replica/diff_disk.go @@ -237,7 +237,7 @@ func (d *diffDisk) read(target byte, buf []byte, startOffset int64, startSector // May read the expanded part if offset >= size { - return 0, nil + return int(bufLength), nil } var newBuf []byte if bufLength > size-offset {