mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-09 13:28:20 +01:00
filer: keep compressed chunks on the whole-chunk path
Like ciphered chunks, a range request on a compressed chunk makes the volume server read and decompress the whole needle, so range-per-buffer would repeat the full backend read for each 256KiB window. Route them through the shared whole-chunk path via ChunkView.CanRangeFetch.
This commit is contained in:
1 parent
521a19c567
commit
1f15e7865a
4 files changed
+34
-15
No files matched your search
@@ -100,11 +100,11 @@ func (rc *ReaderCache) MaybeCache(chunkViews *Interval[*ChunkView], count int) {
|
||||
// abort when slots are filled
|
||||
return
|
||||
}
|
||||
if chunkView.CipherKey == nil && !chunkView.IsFullChunk() {
|
||||
if chunkView.CanRangeFetch() && !chunkView.IsFullChunk() {
|
||||
// the view is clipped to part of the chunk and will be
|
||||
// range-fetched, so prefetching it whole would download bytes
|
||||
// nobody needs; a ciphered partial view needs the whole blob
|
||||
// anyway and is worth prefetching
|
||||
// nobody needs; a ciphered or compressed partial view needs
|
||||
// the whole blob anyway and is worth prefetching
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user