You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "risdenk (via GitHub)" <gi...@apache.org> on 2023/03/09 18:59:19 UTC

[GitHub] [solr] risdenk commented on a diff in pull request #1442: Improving efficiency of replication process

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

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


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