This is an automated email from the ASF dual-hosted git repository.

ishan pushed a commit to branch jira/SOLR15694
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/jira/SOLR15694 by this push:
     new 071d8f3  Test fix
071d8f3 is described below

commit 071d8f3d4618431c0c3543c6aa7891939a887155
Author: Ishan Chattopadhyaya <[email protected]>
AuthorDate: Fri Jan 7 22:09:56 2022 +0530

    Test fix
---
 .../src/java/org/apache/solr/core/CoreContainer.java    | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java 
b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index a880035..b915330 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -947,17 +947,18 @@ public class CoreContainer {
       });
 
       clusterSingletons.setReady();
-      if (!distributedCollectionCommandRunner.isPresent()) {
-        if 
(NodeRoles.MODE_PREFERRED.equals(nodeRoles.getRoleMode(NodeRoles.Role.OVERSEER)))
 {
-          try {
-            log.info("This node is started as a preferred overseer");
-            zkSys.getZkController().setPreferredOverseer();
-          } catch (KeeperException | InterruptedException e) {
-            throw new SolrException(ErrorCode.SERVER_ERROR, e);
-          }
+      if 
(NodeRoles.MODE_PREFERRED.equals(nodeRoles.getRoleMode(NodeRoles.Role.OVERSEER)))
 {
+        try {
+          log.info("This node has been started as a preferred overseer");
+          zkSys.getZkController().setPreferredOverseer();
+        } catch (KeeperException | InterruptedException e) {
+          throw new SolrException(ErrorCode.SERVER_ERROR, e);
         }
+      }
+      if (!distributedCollectionCommandRunner.isPresent()) {
         zkSys.getZkController().checkOverseerDesignate();
       }
+
     }
     // This is a bit redundant but these are two distinct concepts for all 
they're accomplished at the same time.
     status |= LOAD_COMPLETE | INITIAL_CORE_LOAD_COMPLETE;

Reply via email to