diff options
| author | chrislu <chris.lu@gmail.com> | 2022-09-08 19:07:57 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-09-08 19:07:57 -0700 |
| commit | 64e75a286ee619893c50ed900adddbd914a5ac43 (patch) | |
| tree | cff757aa8e685a9936f1f786fb98c431c9c71899 | |
| parent | d14d029c736b819ab550818852817e8452c05931 (diff) | |
| download | seaweedfs-64e75a286ee619893c50ed900adddbd914a5ac43.tar.xz seaweedfs-64e75a286ee619893c50ed900adddbd914a5ac43.zip | |
simplify a bit
| -rw-r--r-- | weed/storage/volume_read.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/weed/storage/volume_read.go b/weed/storage/volume_read.go index c12f2baf4..20bda83bb 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() |
