risdenk commented on code in PR #1442:
URL: https://github.com/apache/solr/pull/1442#discussion_r1131466824


##########
solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java:
##########
@@ -223,8 +223,10 @@ private final void replicate(String nodeName, SolrCore 
core, ZkNodeProps leaderp
 
     log.info("Attempting to replicate from [{}].", leaderUrl);
 
-    // send commit
-    commitOnLeader(leaderUrl);
+    // send commit if replica could be a leader
+    if (replicaType == null || Replica.Type.isLeaderType(replicaType)) {

Review Comment:
   minor: `Replica.Type.isLeaderType` could also check for null and make this 
logic clearer



-- 
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