bump up the version of entry by large value so that transfer of range
takes precedence (if there is any conflict in merging entry) over other operations on the entry that increments the version Fixes #3612
This commit is contained in:
1 parent
b248e021ec
commit
873781ab58
1 file changed
+3
-1
+3
-1
@@ -565,7 +565,9 @@ func (r *Ring) Transfer(from, to mesh.PeerName) []address.Range {
|
||||
for i, entry := range r.Entries {
|
||||
if entry.Peer == from {
|
||||
entry.Peer = to
|
||||
entry.Version++
|
||||
// bump version by large value so that transfer of range takes precedence (if there is any conflict in merging entry)
|
||||
// over other opertaions on the entry that increments the version
|
||||
entry.Version = entry.Version + 100
|
||||
newRanges = append(newRanges, address.Range{Start: entry.Token, End: r.Entries.entry(i + 1).Token})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user