Apache Lucene open-source search software
SOLR-11702: Fix precommit, only throw error to client if the replica is not in the same shard as leader
Cao Manh Datdae572819ba4
diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.javaindex 50705825e3d..d5e4194b15b 100644--- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java+++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java@@ -897,8 +897,11 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {log.warn("Core "+cloudDesc.getCoreNodeName()+" belonging to "+collection+" "+shardId+", does not have error'd node " + stdNode.getNodeProps().getCoreUrl() + " as a replica. " +"No request recovery command will be sent!");- // some replicas did not receive the updates, exception must be notified to clients- errorsForClient.add(error);+ if (!shardId.equals(cloudDesc.getShardId())) {+ // some replicas on other shard did not receive the updates (ex: during splitshard),+ // exception must be notified to clients+ errorsForClient.add(error);+ }} else {log.warn("Core " + cloudDesc.getCoreNodeName() + " is no longer the leader for " + collection + " "+ shardId + " or we tried to put ourself into LIR, no request recovery command will be sent!");