You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2014/07/12 21:55:01 UTC
svn commit: r1610033 - in /lucene/dev/trunk/solr: ./
core/src/java/org/apache/solr/cloud/
core/src/java/org/apache/solr/update/processor/
solrj/src/java/org/apache/solr/common/cloud/
Author: shalin
Date: Sat Jul 12 19:55:00 2014
New Revision: 1610033
URL: http://svn.apache.org/r1610033
Log:
SOLR-6240: Removed unused coreName parameter in ZkStateReader.getReplicaProps
Modified:
lucene/dev/trunk/solr/CHANGES.txt
lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java
lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1610033&r1=1610032&r2=1610033&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sat Jul 12 19:55:00 2014
@@ -201,6 +201,8 @@ Other Changes
* SOLR-2853: Add a unit test for the case when "spellcheck.maxCollationTries=0" (James Dyer)
+* SOLR-6240: Removed unused coreName parameter in ZkStateReader.getReplicaProps. (shalin)
+
================== 4.9.0 ==================
Versions of Major Components
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java?rev=1610033&r1=1610032&r2=1610033&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java Sat Jul 12 19:55:00 2014
@@ -195,7 +195,7 @@ public class LeaderInitiatedRecoveryThre
} else {
String leaderCoreNodeName = zkStateReader.getLeaderRetry(collection, shardId, 5000).getName();
List<ZkCoreNodeProps> replicaProps =
- zkStateReader.getReplicaProps(collection, shardId, leaderCoreNodeName, coreNeedingRecovery, null, null);
+ zkStateReader.getReplicaProps(collection, shardId, leaderCoreNodeName);
if (replicaProps != null && replicaProps.size() > 0) {
String replicaState = replicaProps.get(0).getState();
if (ZkStateReader.ACTIVE.equals(replicaState)) {
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java?rev=1610033&r1=1610032&r2=1610033&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java Sat Jul 12 19:55:00 2014
@@ -312,7 +312,6 @@ public class DistributedUpdateProcessor
forwardToLeader = false;
return nodes;
}
- String coreName = req.getCore().getName();
ClusterState cstate = zkController.getClusterState();
DocCollection coll = cstate.getCollection(collection);
@@ -361,7 +360,7 @@ public class DistributedUpdateProcessor
slice = coll.getSlice(myShardId);
shardId = myShardId;
leaderReplica = zkController.getZkStateReader().getLeaderRetry(collection, myShardId);
- List<ZkCoreNodeProps> myReplicas = zkController.getZkStateReader().getReplicaProps(collection, shardId, leaderReplica.getName(), coreName, null, ZkStateReader.DOWN);
+ List<ZkCoreNodeProps> myReplicas = zkController.getZkStateReader().getReplicaProps(collection, shardId, leaderReplica.getName(), null, ZkStateReader.DOWN);
}
}
@@ -379,8 +378,7 @@ public class DistributedUpdateProcessor
// so get the replicas...
forwardToLeader = false;
List<ZkCoreNodeProps> replicaProps = zkController.getZkStateReader()
- .getReplicaProps(collection, shardId, leaderReplica.getName(),
- coreName, null, ZkStateReader.DOWN);
+ .getReplicaProps(collection, shardId, leaderReplica.getName(), null, ZkStateReader.DOWN);
if (replicaProps != null) {
if (nodes == null) {
@@ -1415,8 +1413,7 @@ public class DistributedUpdateProcessor
Replica leaderReplica = zkController.getZkStateReader().getLeaderRetry(
collection, myShardId);
List<ZkCoreNodeProps> replicaProps = zkController.getZkStateReader()
- .getReplicaProps(collection, myShardId, leaderReplica.getName(),
- req.getCore().getName(), null, ZkStateReader.DOWN);
+ .getReplicaProps(collection, myShardId, leaderReplica.getName(), null, ZkStateReader.DOWN);
if (replicaProps != null) {
List<Node> myReplicas = new ArrayList<>();
for (ZkCoreNodeProps replicaProp : replicaProps) {
Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java?rev=1610033&r1=1610032&r2=1610033&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java Sat Jul 12 19:55:00 2014
@@ -578,17 +578,17 @@ public class ZkStateReader {
}
public List<ZkCoreNodeProps> getReplicaProps(String collection,
- String shardId, String thisCoreNodeName, String coreName) {
- return getReplicaProps(collection, shardId, thisCoreNodeName, coreName, null);
+ String shardId, String thisCoreNodeName) {
+ return getReplicaProps(collection, shardId, thisCoreNodeName);
}
public List<ZkCoreNodeProps> getReplicaProps(String collection,
- String shardId, String thisCoreNodeName, String coreName, String mustMatchStateFilter) {
- return getReplicaProps(collection, shardId, thisCoreNodeName, coreName, mustMatchStateFilter, null);
+ String shardId, String thisCoreNodeName, String mustMatchStateFilter) {
+ return getReplicaProps(collection, shardId, thisCoreNodeName, mustMatchStateFilter, null);
}
public List<ZkCoreNodeProps> getReplicaProps(String collection,
- String shardId, String thisCoreNodeName, String coreName, String mustMatchStateFilter, String mustNotMatchStateFilter) {
+ String shardId, String thisCoreNodeName, String mustMatchStateFilter, String mustNotMatchStateFilter) {
assert thisCoreNodeName != null;
ClusterState clusterState = this.clusterState;
if (clusterState == null) {