From dae572819ba479bffd990ea7d8f0c4f7b76da5b0 Mon Sep 17 00:00:00 2001 From: Cao Manh Dat Date: Fri, 9 Mar 2018 10:34:59 +0700 Subject: [PATCH] SOLR-11702: Fix precommit, only throw error to client if the replica is not in the same shard as leader --- .../solr/update/processor/DistributedUpdateProcessor.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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.java index 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!");