You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2021/03/10 10:09:59 UTC
[lucene] 02/07: fix DUP
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch jira/solr14003
in repository https://gitbox.apache.org/repos/asf/lucene.git
commit a7777f14a7203c4ac7666b2ab8f61c2a7eeaad98
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()));