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
This commit is contained in:
Varun Thacker 2016-01-18 19:13:52 +00:00
parent db7653e3ef
commit f48207168e
2 changed files with 5 additions and 11 deletions

View File

@ -540,6 +540,9 @@ Other Changes
several places in Solr now additionally support BCP47 in config several places in Solr now additionally support BCP47 in config
files. (Uwe Schindler, Robert Muir) 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 ================== ================== 5.4.1 ==================
Bug Fixes Bug Fixes

View File

@ -261,9 +261,6 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
case OVERSEERSTATUS: case OVERSEERSTATUS:
getOverseerStatus(message, results); getOverseerStatus(message, results);
break; 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: case ADDREPLICAPROP:
processReplicaAddPropertyCommand(message); processReplicaAddPropertyCommand(message);
break; break;
@ -2500,8 +2497,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
@Override @Override
public void markExclusiveTask(String collectionName, ZkNodeProps message) { public void markExclusiveTask(String collectionName, ZkNodeProps message) {
//TODO deprecated remove this check . if (collectionName != null) {
if (!CLUSTERSTATUS.isEqual(message.getStr(Overseer.QUEUE_OPERATION)) && collectionName != null) {
synchronized (collectionWip) { synchronized (collectionWip) {
collectionWip.add(collectionName); collectionWip.add(collectionName);
} }
@ -2510,7 +2506,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
@Override @Override
public void unmarkExclusiveTask(String collectionName, String operation, ZkNodeProps message) { public void unmarkExclusiveTask(String collectionName, String operation, ZkNodeProps message) {
if(!CLUSTERSTATUS.isEqual(operation) && collectionName != null) { if(collectionName != null) {
synchronized (collectionWip) { synchronized (collectionWip) {
collectionWip.remove(collectionName); collectionWip.remove(collectionName);
} }
@ -2519,11 +2515,6 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
@Override @Override
public ExclusiveMarking checkExclusiveMarking(String collectionName, ZkNodeProps message) { 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) { synchronized (collectionWip) {
if(collectionWip.contains(collectionName)) if(collectionWip.contains(collectionName))
return ExclusiveMarking.NONEXCLUSIVE; return ExclusiveMarking.NONEXCLUSIVE;