SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
Filer: fix filer range read (#7078)
Chris Lu513ac58504a2
diff --git a/weed/filer/filechunks.go b/weed/filer/filechunks.goindex 7252169d88..43261a9709 100644--- a/weed/filer/filechunks.go+++ b/weed/filer/filechunks.go@@ -178,7 +178,10 @@ func (cv *ChunkView) Clone() IntervalValue {}func (cv *ChunkView) IsFullChunk() bool {- return cv.ViewSize == cv.ChunkSize+ // IsFullChunk returns true if the view covers the entire chunk from the beginning.+ // This prevents bandwidth amplification when range requests happen to align+ // with chunk boundaries but don't actually want the full chunk.+ return cv.OffsetInChunk == 0 && cv.ViewSize == cv.ChunkSize}func ViewFromChunks(ctx context.Context, lookupFileIdFn wdclient.LookupFileIdFunctionType, chunks []*filer_pb.FileChunk, offset int64, size int64) (chunkViews *IntervalList[*ChunkView]) {