You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by va...@apache.org on 2016/08/13 12:32:06 UTC
lucene-solr:branch_6x: SOLR-9092: In the deletereplica commandand add
a live check before calling delete core
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x 5fc35a65c -> 45f9b6b1f
SOLR-9092: In the deletereplica commandand add a live check before calling delete core
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/45f9b6b1
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/45f9b6b1
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/45f9b6b1
Branch: refs/heads/branch_6x
Commit: 45f9b6b1ffcae19bd43a523c0d8e62af5b71fafc
Parents: 5fc35a6
Author: Varun Thacker <va...@apache.org>
Authored: Sat Aug 13 16:52:47 2016 +0530
Committer: Varun Thacker <va...@apache.org>
Committed: Sat Aug 13 18:01:44 2016 +0530
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +++
.../solr/cloud/OverseerCollectionMessageHandler.java | 13 +++++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/45f9b6b1/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index b006da2..96ce5d1 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -232,6 +232,9 @@ Other Changes
* SOLR-9331: Remove ReRankQuery's length constructor argument and member. (Christine Poerschke)
+* SOLR-9092: For the delete replica command we attempt to send the core admin delete request only
+ if that node is actually up. (Jessica Cheng Mallet, Varun Thacker)
+
================== 6.1.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/45f9b6b1/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
index 0588446..49e0942 100644
--- a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
@@ -662,14 +662,19 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
params.set(CoreAdminParams.DELETE_INSTANCE_DIR, message.getBool(CoreAdminParams.DELETE_INSTANCE_DIR, true));
params.set(CoreAdminParams.DELETE_DATA_DIR, message.getBool(CoreAdminParams.DELETE_DATA_DIR, true));
- sendShardRequest(replica.getNodeName(), params, shardHandler, asyncId, requestMap.get());
+ boolean isLive = zkStateReader.getClusterState().getLiveNodes().contains(replica.getNodeName());
+ if (isLive) {
+ sendShardRequest(replica.getNodeName(), params, shardHandler, asyncId, requestMap.get());
+ }
Callable<Boolean> callable = () -> {
try {
- processResponses(results, shardHandler, false, null, asyncId, requestMap.get());
+ if (isLive) {
+ processResponses(results, shardHandler, false, null, asyncId, requestMap.get());
- //check if the core unload removed the corenode zk entry
- if (waitForCoreNodeGone(collectionName, shard, replicaName, 5000)) return Boolean.TRUE;
+ //check if the core unload removed the corenode zk entry
+ if (waitForCoreNodeGone(collectionName, shard, replicaName, 5000)) return Boolean.TRUE;
+ }
// try and ensure core info is removed from cluster state
deleteCoreNode(collectionName, replicaName, replica, core);