You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by da...@apache.org on 2018/03/09 03:36:22 UTC

lucene-solr:branch_7x: SOLR-11702: Fix precommit, only throw error to client if the replica is not in the same shard as leader

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x de5374688 -> b992bbb2d


SOLR-11702: Fix precommit, only throw error to client if the replica is not in the same shard as leader


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b992bbb2
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b992bbb2
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b992bbb2

Branch: refs/heads/branch_7x
Commit: b992bbb2d7480d4cf2ff1d9302a7e20732c1100c
Parents: de53746
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri Mar 9 10:34:59 2018 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri Mar 9 10:36:12 2018 +0700

----------------------------------------------------------------------
 .../solr/update/processor/DistributedUpdateProcessor.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b992bbb2/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
----------------------------------------------------------------------
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 5070582..d5e4194 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!");