You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2019/12/17 04:06:42 UTC

[lucene-solr] branch jira/solr14089 updated: fix DUP

This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch jira/solr14089
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/jira/solr14089 by this push:
     new fcb6447  fix DUP
fcb6447 is described below

commit fcb6447e1553e5907010b8c87bf416bd86c4d626
Author: noble <no...@apache.org>
AuthorDate: Tue Dec 17 15:03:43 2019 +1100

    fix DUP
---
 .../apache/solr/update/processor/DistributedZkUpdateProcessor.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
index 85705f6..510a04f 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedZkUpdateProcessor.java
@@ -164,7 +164,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
     Replica leaderReplica = null;
     zkCheck();
     try {
-      leaderReplica = zkController.getZkStateReader().getLeaderRetry(collection, cloudDesc.getShardId());
+      leaderReplica = zkController.getZkStateReader().getShardStateProvider(collection).getLeader(collection, cloudDesc.getShardId(), -1);// getLeaderRetry(collection, cloudDesc.getShardId());
     } catch (InterruptedException e) {
       Thread.interrupted();
       throw new SolrException(SolrException.ErrorCode.SERVICE_UNAVAILABLE, "Exception finding leader for shard " + cloudDesc.getShardId(), e);
@@ -760,7 +760,7 @@ public class DistributedZkUpdateProcessor extends DistributedUpdateProcessor {
     for (Map.Entry<String,Slice> sliceEntry : slices.entrySet()) {
       Slice replicas = slices.get(sliceEntry.getKey());
       if (onlyLeaders) {
-        Replica replica = docCollection.getLeader(replicas.getName());
+        Replica replica =  req.getCore().getShardStateProvider().getLeader(replicas);// docCollection.getLeader(replicas.getName());
         if (replica != null) {
           ZkCoreNodeProps nodeProps = new ZkCoreNodeProps(replica);
           urls.add(new SolrCmdDistributor.StdNode(nodeProps, collection, replicas.getName()));