epugh commented on code in PR #2391:
URL: https://github.com/apache/solr/pull/2391#discussion_r2435354793


##########
solr/core/src/java/org/apache/solr/core/ZkContainer.java:
##########
@@ -75,32 +81,40 @@ public class ZkContainer {
   public ZkContainer() {}
 
   public void initZooKeeper(final CoreContainer cc, CloudConfig config) {
-    boolean zkRun = 
EnvUtils.getPropertyAsBool("solr.zookeeper.server.enabled", false);
+    final boolean zkServerEnabled =
+        EnvUtils.getPropertyAsBool("solr.zookeeper.server.enabled", false);
+    // TODO NOCOMMIT - understand when zkRun is set
+    boolean zkQuorumNode = false;
+    if 
(NodeRoles.MODE_ON.equals(cc.nodeRoles.getRoleMode(NodeRoles.Role.ZOOKEEPER_QUORUM)))
 {
+      zkQuorumNode = true;
+      log.info("Starting node in ZooKeeper Quorum role.");
+    }
 
-    if (zkRun && config == null)
+    if (zkServerEnabled && config == null) {
       throw new SolrException(
           SolrException.ErrorCode.SERVER_ERROR,
           "Cannot start Solr in cloud mode - no cloud config provided");
+    }
+
+    if (config == null) {

Review Comment:
   How does this even get hit?  Sometimes I get confused by all the null 
checks!  If you are running in standalone, wouldn't this class never be run???!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to