aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-27 12:18:45 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-27 12:18:45 -0700
commitec75b2d761e9b38530674a3d0a1e17adc154cc1a (patch)
treea166a9cb1fcd6aba058b6dbeff0b6ada4cfbb814
parent6883f9e3227ba4b7e3db69d180b15203a8578256 (diff)
downloadseaweedfs-ec75b2d761e9b38530674a3d0a1e17adc154cc1a.tar.xz
seaweedfs-ec75b2d761e9b38530674a3d0a1e17adc154cc1a.zip
volume: fix bug with 8000GB version if using in memory index
fix https://github.com/chrislusf/seaweedfs/issues/994
-rw-r--r--weed/storage/needle_map/compact_map.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/storage/needle_map/compact_map.go b/weed/storage/needle_map/compact_map.go
index 4089e65f7..76783d0b0 100644
--- a/weed/storage/needle_map/compact_map.go
+++ b/weed/storage/needle_map/compact_map.go
@@ -1,9 +1,10 @@
package needle_map
import (
- . "github.com/chrislusf/seaweedfs/weed/storage/types"
"sort"
"sync"
+
+ . "github.com/chrislusf/seaweedfs/weed/storage/types"
)
const (
@@ -81,7 +82,7 @@ func (cs *CompactSection) Set(key NeedleId, offset Offset, size uint32) (oldOffs
func (cs *CompactSection) setOverflowEntry(skey SectionalNeedleId, offset Offset, size uint32) {
needleValue := SectionalNeedleValue{Key: skey, OffsetLower: offset.OffsetLower, Size: size}
- needleValueExtra := SectionalNeedleValueExtra{OffsetHigher: OffsetHigher{}}
+ needleValueExtra := SectionalNeedleValueExtra{OffsetHigher: offset.OffsetHigher}
insertCandidate := sort.Search(len(cs.overflow), func(i int) bool {
return cs.overflow[i].Key >= needleValue.Key
})