mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-30 00:40:44 +01:00
init candidate servers when setting a starting snapshot
This commit is contained in:
1 parent
a5645d50a7
commit
658d302aa4
1 file changed
+4
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user