Browse Source

init candidate servers when setting a starting snapshot

mq-subscribe
chrislu 8 months ago
parent
commit
658d302aa4
  1. 4
      weed/cluster/lock_manager/lock_ring.go

4
weed/cluster/lock_manager/lock_ring.go

@ -79,6 +79,10 @@ func (r *LockRing) SetSnapshot(servers []pb.ServerAddress) {
r.Lock()
r.lastUpdateTime = time.Now()
// init candidateServers
for _, server := range servers {
r.candidateServers[server] = struct{}{}
}
r.Unlock()
r.addOneSnapshot(servers)

Loading…
Cancel
Save