|
|
@ -142,6 +142,7 @@ FullSync:
|
|
|
|
case <-s.SyncFull.Notif():
|
|
|
|
case <-s.SyncFull.Notif():
|
|
|
|
select {
|
|
|
|
select {
|
|
|
|
case <-time.After(s.stagger(s.serverUpInterval)):
|
|
|
|
case <-time.After(s.stagger(s.serverUpInterval)):
|
|
|
|
|
|
|
|
continue FullSync
|
|
|
|
case <-s.ShutdownCh:
|
|
|
|
case <-s.ShutdownCh:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -149,12 +150,11 @@ FullSync:
|
|
|
|
// retry full sync after some time
|
|
|
|
// retry full sync after some time
|
|
|
|
// todo(fs): why don't we use s.Interval here?
|
|
|
|
// todo(fs): why don't we use s.Interval here?
|
|
|
|
case <-time.After(s.retryFailInterval + s.stagger(s.retryFailInterval)):
|
|
|
|
case <-time.After(s.retryFailInterval + s.stagger(s.retryFailInterval)):
|
|
|
|
|
|
|
|
continue FullSync
|
|
|
|
|
|
|
|
|
|
|
|
case <-s.ShutdownCh:
|
|
|
|
case <-s.ShutdownCh:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// do partial syncs until it is time for a full sync again
|
|
|
|
// do partial syncs until it is time for a full sync again
|
|
|
|