From b0b3721f84dc47e6edcc91a1d6faae55794e9c7f Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Wed, 26 Nov 2014 14:59:27 +0100 Subject: [PATCH] Added forgotten cluster block check Original commit: elastic/x-pack-elasticsearch@022be40b54e7307a0b71b96d5ad5fe951af617b1 --- .../transport/actions/stats/TransportAlertStatsAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/alerts/transport/actions/stats/TransportAlertStatsAction.java b/src/main/java/org/elasticsearch/alerts/transport/actions/stats/TransportAlertStatsAction.java index 9472f6b5105..dbaee54b79e 100644 --- a/src/main/java/org/elasticsearch/alerts/transport/actions/stats/TransportAlertStatsAction.java +++ b/src/main/java/org/elasticsearch/alerts/transport/actions/stats/TransportAlertStatsAction.java @@ -14,6 +14,7 @@ import org.elasticsearch.alerts.actions.AlertActionManager; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; +import org.elasticsearch.cluster.block.ClusterBlockLevel; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.threadpool.ThreadPool; @@ -64,7 +65,7 @@ public class TransportAlertStatsAction extends TransportMasterNodeOperationActio @Override protected ClusterBlockException checkBlock(AlertsStatsRequest request, ClusterState state) { - return null; + return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA); }