Skip to content

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.

simplify a bit

chrislu64e75a286ee6
diff --git a/weed/storage/volume_read.go b/weed/storage/volume_read.go
index c12f2baf43..20bda83bb0 100644
--- a/weed/storage/volume_read.go
+++ b/weed/storage/volume_read.go
@@ -137,16 +137,12 @@ func (v *Volume) readNeedleDataInto(n *needle.Needle, readOption *ReadOption, wr
// possibly re-read needle offset if volume is compacted
if readOption.VolumeRevision != v.SuperBlock.CompactionRevision {
// the volume is compacted
- readOption.IsOutOfRange = false
nv, ok = v.nm.Get(n.Id)
if !ok || nv.Offset.IsZero() {
v.dataFileAccessLock.RUnlock()
return ErrorNotFound
}
- actualOffset := nv.Offset.ToActualOffset()
- if readOption.IsOutOfRange {
- actualOffset += int64(MaxPossibleVolumeSize)
- }
+ actualOffset = nv.Offset.ToActualOffset()
}
count, err := n.ReadNeedleData(v.DataBackend, actualOffset, buf, x)
v.dataFileAccessLock.RUnlock()