summaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/MasterElectionHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/MasterElectionHandler.java')
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/MasterElectionHandler.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/MasterElectionHandler.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/MasterElectionHandler.java
index b041e6b14f8..fa303533355 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/MasterElectionHandler.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/MasterElectionHandler.java
@@ -118,7 +118,7 @@ public class MasterElectionHandler implements MasterInterface {
return 2 * followers <= totalCount;
}
- public boolean isAmongNthFirst(int first) { return (nextInLineCount < first); }
+ public boolean isFirstInLine() { return (nextInLineCount < 1); }
public boolean watchMasterElection(DatabaseHandler database, DatabaseHandler.DatabaseContext dbContext) {
if (totalCount == 1 && !usingZooKeeper) {
@@ -251,7 +251,7 @@ public class MasterElectionHandler implements MasterInterface {
nextMasterData = null;
}
- public void writeHtmlState(StringBuilder sb, int stateGatherCount) {
+ public void writeHtmlState(StringBuilder sb) {
sb.append("<h2>Master state</h2>\n");
Integer master = getMaster();
if (master != null) {
@@ -270,7 +270,7 @@ public class MasterElectionHandler implements MasterInterface {
.append(" before electing new master unless all possible master candidates are online.</p>");
}
}
- if ((master == null || master != index) && nextInLineCount < stateGatherCount) {
+ if ((master == null || master != index) && nextInLineCount < 1) {
sb.append("<p>As we are number ").append(nextInLineCount)
.append(" in line for taking over as master, we're gathering state from nodes.</p>");
sb.append("<p><font color=\"red\">As we are not the master, we don't know about nodes current system state"