mirror of https://github.com/apache/lucene.git
SOLR-9092: In the deletereplica commandand add a live check before calling delete core
This commit is contained in:
parent
70d27aec83
commit
1d9be84cb6
|
@ -267,6 +267,9 @@ Other Changes
|
||||||
|
|
||||||
* SOLR-9331: Remove ReRankQuery's length constructor argument and member. (Christine Poerschke)
|
* 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 ==================
|
================== 6.1.0 ==================
|
||||||
|
|
||||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||||
|
|
|
@ -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_INSTANCE_DIR, message.getBool(CoreAdminParams.DELETE_INSTANCE_DIR, true));
|
||||||
params.set(CoreAdminParams.DELETE_DATA_DIR, message.getBool(CoreAdminParams.DELETE_DATA_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 = () -> {
|
Callable<Boolean> callable = () -> {
|
||||||
try {
|
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
|
//check if the core unload removed the corenode zk entry
|
||||||
if (waitForCoreNodeGone(collectionName, shard, replicaName, 5000)) return Boolean.TRUE;
|
if (waitForCoreNodeGone(collectionName, shard, replicaName, 5000)) return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
// try and ensure core info is removed from cluster state
|
// try and ensure core info is removed from cluster state
|
||||||
deleteCoreNode(collectionName, replicaName, replica, core);
|
deleteCoreNode(collectionName, replicaName, replica, core);
|
||||||
|
|
Loading…
Reference in New Issue