Skip to content

Commit 6f41cb9

Browse files
Election scheduler log (elastic#136611)
Adds a debug log to `Coordinator.startElectionScheduler()` in the case a local node is not the master and hence cannot trigger an election scheduler
1 parent 9f78848 commit 6f41cb9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/main/java/org/elasticsearch/cluster/coordination/Coordinator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1812,7 +1812,7 @@ protected void onFoundPeersUpdated() {
18121812

18131813
if (foundQuorum) {
18141814
if (electionScheduler == null) {
1815-
logger.debug("starting election scheduler, expecting votes [{}]", expectedVotes);
1815+
logger.debug("preparing election scheduler, expecting votes [{}]", expectedVotes);
18161816
startElectionScheduler();
18171817
}
18181818
} else {
@@ -1834,8 +1834,10 @@ private void startElectionScheduler() {
18341834
assert electionScheduler == null : electionScheduler;
18351835

18361836
if (getLocalNode().isMasterNode() == false) {
1837+
logger.debug("local node is not the master, skipping election scheduler");
18371838
return;
18381839
}
1840+
logger.debug("starting election scheduler");
18391841

18401842
final TimeValue gracePeriod = TimeValue.ZERO;
18411843
electionScheduler = electionSchedulerFactory.startElectionScheduler(gracePeriod, new Runnable() {

0 commit comments

Comments
 (0)