mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcd: fix cluster sync
This commit is contained in:
parent
9746de91bf
commit
9756dba57a
@ -394,7 +394,7 @@ func (s *Server) runParticipant() {
|
||||
}
|
||||
|
||||
func (s *Server) runStandby() {
|
||||
syncDuration := time.Duration(0)
|
||||
var syncDuration time.Duration
|
||||
for {
|
||||
select {
|
||||
case <-time.After(syncDuration):
|
||||
@ -407,6 +407,7 @@ func (s *Server) runStandby() {
|
||||
log.Println("standby sync:", err)
|
||||
continue
|
||||
}
|
||||
syncDuration = time.Duration(s.clusterConf.SyncInterval * float64(time.Second))
|
||||
if s.clusterConf.ActiveSize <= len(s.nodes) {
|
||||
continue
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user