Revert "Wait for a raft quorum + logging a message to inform about the wait"
Reverting-back for further investigation.
This reverts commit d2f457b80f9bea8c34f895d822e2328281386a6b.
Change-Id: I83d2c171fd26e4008c0fd36ed635993eb18b3718
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java
index 3f59ec7..2c0ff14 100644
--- a/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java
+++ b/core/store/dist/src/main/java/org/onlab/onos/store/service/impl/DatabaseManager.java
@@ -224,20 +224,16 @@
clusterEventListener = new InternalClusterEventListener();
clusterService.addListener(clusterEventListener);
- final int raftClusterSize = clusterConfig.getMembers().size();
- final int raftClusterQuorumSize = (int) (Math.floor(raftClusterSize / 2)) + 1;
- if (clusterService.getNodes().size() < raftClusterQuorumSize) {
+ if (clusterService.getNodes().size() < clusterConfig.getMembers().size()) {
// current cluster size smaller then expected
try {
- final int waitTimeSec = 120;
- log.info("Waiting for a maximum of {}s for raft cluster quorum to boot up...", waitTimeSec);
- if (!clusterEventLatch.await(waitTimeSec, TimeUnit.SECONDS)) {
+ if (!clusterEventLatch.await(120, TimeUnit.SECONDS)) {
log.info("Starting with {}/{} nodes cluster",
clusterService.getNodes().size(),
- raftClusterSize);
+ clusterConfig.getMembers().size());
}
} catch (InterruptedException e) {
- log.info("Interrupted waiting for raft quorum.", e);
+ log.info("Interrupted waiting for others", e);
}
}
}