Added forgotten cluster block check

Original commit: elastic/x-pack-elasticsearch@022be40b54
This commit is contained in:
Martijn van Groningen 2014-11-26 14:59:27 +01:00
parent a34504b45e
commit b0b3721f84
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}