Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(diff): always resyncMonitors the first time after acquiring watch…
… leader lease When watch leader lease gets acquired the first time during a normal startup, discoveryResyncCh got its initial signal from the first cluster discovery sync, thus resyncMonitors runs exactly once as expected. However, when the watch leader lease is lost after a while and later re-acquired, discoveryResyncCh would not generate new signals if the cluster is unchanged, so the watcher is stuck at the initial state with no monitors, thus workers never receive any events. When the same instance later acquires the diff writer lease, since diff workers never receive any events, the diff writer would not write any diff. This is fixed by always ensuring a resyncMonitors run during each resyncMonitorsLoop call (which is called during each watch leader term).
- Loading branch information