File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
server/src/main/java/org/elasticsearch/cluster/coordination Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -446,9 +446,10 @@ public void invariant() {
446446 = currentPublication .map (Publication ::publishedState ).orElse (coordinationState .get ().getLastAcceptedState ());
447447 lastPublishedState .nodes ().forEach (lastPublishedNodes ::add );
448448 assert lastPublishedNodes .remove (getLocalNode ());
449+ assert lastPublishedNodes .equals (knownFollowers ) : lastPublishedNodes + " != " + knownFollowers
450+ + " [becomingMaster=" + becomingMaster + ", publicationInProgress=" + publicationInProgress () + "]" ;
451+ // TODO instead assert that knownFollowers is updated appropriately at the end of each publication
449452 }
450- assert lastPublishedNodes .equals (knownFollowers ) : lastPublishedNodes + " != " + knownFollowers
451- + " [becomingMaster=" + becomingMaster + ", publicationInProgress=" + publicationInProgress () + "]" ;
452453 } else if (mode == Mode .FOLLOWER ) {
453454 assert coordinationState .get ().electionWon () == false : getLocalNode () + " is FOLLOWER so electionWon() should be false" ;
454455 assert lastKnownLeader .isPresent () && (lastKnownLeader .get ().equals (getLocalNode ()) == false );
You can’t perform that action at this time.
0 commit comments