context cancellation during reading range reading large files (#7092)

* context cancellation during reading range reading large files

* address comments
This commit is contained in:
Chris Lu
2025-08-04 23:22:11 -07:00
committed by GitHub
parent 375dfe18a4
commit a834327755
3 changed files with 74 additions and 7 deletions

View File

@@ -199,7 +199,7 @@ func (c *ChunkReadAt) readChunkSliceAt(buffer []byte, chunkView *ChunkView, next
if n > 0 {
return n, err
}
return fetchChunkRange(buffer, c.readerCache.lookupFileIdFn, chunkView.FileId, chunkView.CipherKey, chunkView.IsGzipped, int64(offset))
return fetchChunkRange(context.Background(), buffer, c.readerCache.lookupFileIdFn, chunkView.FileId, chunkView.CipherKey, chunkView.IsGzipped, int64(offset))
}
shouldCache := (uint64(chunkView.ViewOffset) + chunkView.ChunkSize) <= c.readerCache.chunkCache.GetMaxFilePartSizeInCache()