@ -143,7 +143,7 @@ func ViewFromVisibleIntervals(visibles []VisibleInterval, offset int64, size int
FileId: chunk.fileId,
Offset: chunkStart-chunk.start,
Size: uint64(chunkStop - chunkStart),
LogicOffset: chunk.start,
LogicOffset: chunkStart,
ChunkSize: chunk.chunkSize,
CipherKey: chunk.cipherKey,
IsGzipped: chunk.isGzipped,
@ -290,7 +290,7 @@ func TestChunksReading(t *testing.T) {
Size: 400,
Expected: []*ChunkView{
{Offset: 0, Size: 200, FileId: "asdf", LogicOffset: 0},
// {Offset: 0, Size: 150, FileId: "xxxx"}, // missing intervals should not happen
{Offset: 0, Size: 150, FileId: "xxxx", LogicOffset: 250},
},
// case 5: updates overwrite full chunks