From 64e75a286ee619893c50ed900adddbd914a5ac43 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 8 Sep 2022 19:07:57 -0700 Subject: [PATCH] simplify a bit --- weed/storage/volume_read.go | 6 +----- 1 file changed, 1 insertion(+), 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()