Skip to content

Commit

Permalink
Check convergence and update cached node state
Browse files Browse the repository at this point in the history
Synchronization could be avoid when one of node
turns to be unavailable. However, it does not necessary
mean node group converge. Additional check and update
is required to update cached state in node selector
and status of factory.

Change-Id: I031e604363abfe1cb3141fa47277084a18ec0416
  • Loading branch information
ylui committed Apr 24, 2018
1 parent 1493b85 commit 52a2711
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,6 @@ private boolean checkAndScheduleSynchronization(long membershipUpdateMicros,
return false;
}

if (!this.isSynchronizationRequired && !this.isSetFactoriesAvailabilityRequired) {
return false;
}

if (!NodeGroupUtils.isMembershipSettled(getHost(), getHost().getMaintenanceIntervalMicros(),
this.cachedGroupState)) {
checkConvergence(membershipUpdateMicros, maintOp);
Expand All @@ -652,11 +648,7 @@ private boolean checkAndScheduleSynchronization(long membershipUpdateMicros,
return true;
}

if (!getHost().isPeerSynchronizationEnabled()) {
return false;
}

if (this.isSynchronizationRequired) {
if (this.isSynchronizationRequired && getHost().isPeerSynchronizationEnabled()) {
this.isSynchronizationRequired = false;
if (isDefaultNodeSelector()) {
logInfo("Scheduling synchronization (%d nodes)", this.cachedGroupState.nodes.size());
Expand Down

0 comments on commit 52a2711

Please sign in to comment.