Skip to content

Commit 94436c6

Browse files
authored
Avoid circuit breaker trips in shutdown node actions (#86047) (#86993)
When adding or deleting node shutdown metadata, it is important that as few things go wrong as possible. Since these actions do not do anything with memory, there is no reason they should trip the circuit breaker, but they might accidentally if there is pressure on the system. This commit declares the rest and transport actions as not capable of tripping the circuit breaker. closes #84847
1 parent ccb107e commit 94436c6

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

x-pack/plugin/shutdown/src/main/java/org/elasticsearch/xpack/shutdown/RestDeleteShutdownNodeAction.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ public List<Route> routes() {
2626
return List.of(new Route(RestRequest.Method.DELETE, "/_nodes/{nodeId}/shutdown"));
2727
}
2828

29+
@Override
30+
public boolean canTripCircuitBreaker() {
31+
return false;
32+
}
33+
2934
@Override
3035
protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) {
3136
String nodeId = request.param("nodeId");

x-pack/plugin/shutdown/src/main/java/org/elasticsearch/xpack/shutdown/RestPutShutdownNodeAction.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public List<Route> routes() {
2828
return List.of(new Route(RestRequest.Method.PUT, "/_nodes/{nodeId}/shutdown"));
2929
}
3030

31+
@Override
32+
public boolean canTripCircuitBreaker() {
33+
return false;
34+
}
35+
3136
@Override
3237
protected RestChannelConsumer prepareRequest(RestRequest request, NodeClient client) throws IOException {
3338
String nodeId = request.param("nodeId");

x-pack/plugin/shutdown/src/main/java/org/elasticsearch/xpack/shutdown/TransportDeleteShutdownNodeAction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public TransportDeleteShutdownNodeAction(
4444
) {
4545
super(
4646
DeleteShutdownNodeAction.NAME,
47+
false,
4748
transportService,
4849
clusterService,
4950
threadPool,

x-pack/plugin/shutdown/src/main/java/org/elasticsearch/xpack/shutdown/TransportPutShutdownNodeAction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public TransportPutShutdownNodeAction(
4444
) {
4545
super(
4646
PutShutdownNodeAction.NAME,
47+
false,
4748
transportService,
4849
clusterService,
4950
threadPool,

0 commit comments

Comments
 (0)