From f48207168ef6b00855c47e838e9aedcffe1daa3b Mon Sep 17 00:00:00 2001 From: Varun Thacker Date: Mon, 18 Jan 2016 19:13:52 +0000 Subject: [PATCH] SOLR-7907: Remove CLUSTERSTATUS exclusivity checks from the Overseer git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1725321 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../cloud/OverseerCollectionMessageHandler.java | 13 ++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 482f7754a4a..4c962eac357 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -540,6 +540,9 @@ Other Changes several places in Solr now additionally support BCP47 in config files. (Uwe Schindler, Robert Muir) +* SOLR-7907: Remove CLUSTERSTATUS related exclusivity checks while running commands in the Overseer because the + CLUSTERSTATUS request is served by the individual nodes itself and not via the Overseer node. + ================== 5.4.1 ================== Bug Fixes 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 056cf3ed4d7..c80ab200d26 100644 --- a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java +++ b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java @@ -261,9 +261,6 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler case OVERSEERSTATUS: getOverseerStatus(message, results); break; - case CLUSTERSTATUS://TODO . deprecated. OCP does not need to do it .remove in a later release - new ClusterStatus(zkStateReader, message).getClusterStatus(results); - break; case ADDREPLICAPROP: processReplicaAddPropertyCommand(message); break; @@ -2500,8 +2497,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler @Override public void markExclusiveTask(String collectionName, ZkNodeProps message) { - //TODO deprecated remove this check . - if (!CLUSTERSTATUS.isEqual(message.getStr(Overseer.QUEUE_OPERATION)) && collectionName != null) { + if (collectionName != null) { synchronized (collectionWip) { collectionWip.add(collectionName); } @@ -2510,7 +2506,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler @Override public void unmarkExclusiveTask(String collectionName, String operation, ZkNodeProps message) { - if(!CLUSTERSTATUS.isEqual(operation) && collectionName != null) { + if(collectionName != null) { synchronized (collectionWip) { collectionWip.remove(collectionName); } @@ -2519,11 +2515,6 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler @Override public ExclusiveMarking checkExclusiveMarking(String collectionName, ZkNodeProps message) { - // CLUSTERSTATUS is always mutually exclusive - //TODO deprecated remove this check . - if(CLUSTERSTATUS.isEqual(message.getStr(Overseer.QUEUE_OPERATION))) - return ExclusiveMarking.EXCLUSIVE; - synchronized (collectionWip) { if(collectionWip.contains(collectionName)) return ExclusiveMarking.NONEXCLUSIVE;