pvcnt commented on code in PR #2207:
URL: https://github.com/apache/solr/pull/2207#discussion_r1489285471


##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -2050,15 +2050,13 @@ public void reload(String name, UUID coreId) {
         if (docCollection != null) {
           Replica replica = 
docCollection.getReplica(cd.getCloudDescriptor().getCoreNodeName());
           assert replica != null : cd.getCloudDescriptor().getCoreNodeName() + 
" had no replica";
-          if (replica.getType() == Replica.Type.TLOG) { // TODO: needed here?
+          if (replica.getType().replicateFromLeader) {
             getZkController().stopReplicationFromLeader(core.getName());
-            if (!cd.getCloudDescriptor().isLeader()) {
-              getZkController().startReplicationFromLeader(newCore.getName(), 
true);
+            if (!replica.getType().leaderEligible || 
!cd.getCloudDescriptor().isLeader()) {

Review Comment:
   Good point, I don't remember any good reason for doing so, so I simplified 
the condition.



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to