Browse Source

Avoid breaking add/clear voting exclusions (#86657)

Adding and clearing voting exclusions is part of the steps an operator/orchestration
will take to change topology of a cluster. It is therefore important that as much as
possible these do not fail, and we therefore now bypass the circuit breaker for the
associated rest and transport actions.
Henning Andersen 3 years ago
parent
commit
a9787d707b

+ 5 - 0
docs/changelog/86657.yaml

@@ -0,0 +1,5 @@
+pr: 86657
+summary: Avoid breaking add/clear voting exclusions
+area: Cluster Coordination
+type: bug
+issues: []

+ 1 - 0
server/src/main/java/org/elasticsearch/action/admin/cluster/configuration/TransportAddVotingConfigExclusionsAction.java

@@ -70,6 +70,7 @@ public class TransportAddVotingConfigExclusionsAction extends TransportMasterNod
     ) {
         super(
             AddVotingConfigExclusionsAction.NAME,
+            false,
             transportService,
             clusterService,
             threadPool,

+ 1 - 0
server/src/main/java/org/elasticsearch/action/admin/cluster/configuration/TransportClearVotingConfigExclusionsAction.java

@@ -52,6 +52,7 @@ public class TransportClearVotingConfigExclusionsAction extends TransportMasterN
     ) {
         super(
             ClearVotingConfigExclusionsAction.NAME,
+            false,
             transportService,
             clusterService,
             threadPool,

+ 5 - 0
server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java

@@ -45,6 +45,11 @@ public class RestAddVotingConfigExclusionAction extends BaseRestHandler {
         );
     }
 
+    @Override
+    public boolean canTripCircuitBreaker() {
+        return false;
+    }
+
     @Override
     protected RestChannelConsumer prepareRequest(final RestRequest request, final NodeClient client) throws IOException {
         AddVotingConfigExclusionsRequest votingConfigExclusionsRequest = resolveVotingConfigExclusionsRequest(request);

+ 5 - 0
server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java

@@ -27,6 +27,11 @@ public class RestClearVotingConfigExclusionsAction extends BaseRestHandler {
         return List.of(new Route(DELETE, "/_cluster/voting_config_exclusions"));
     }
 
+    @Override
+    public boolean canTripCircuitBreaker() {
+        return false;
+    }
+
     @Override
     public String getName() {
         return "clear_voting_config_exclusions_action";