Skip to content

Commit 4bbb56b

Browse files
authored
Use urgent priority for node shutdown cluster state update (#85838)
Node shutdown requests submit a cluster state update to initiate the shutdown. Since the cluster may be overloaded, this update could take a long time to be processed. This commit changes the priority to urgent, so that shutdown requests can be processed as quickly as possible. relates #84847
1 parent 36d5b15 commit 4bbb56b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void onFailure(Exception e) {
9393
@Override
9494
public void clusterStateProcessed(ClusterState oldState, ClusterState newState) {
9595
clusterService.getRerouteService()
96-
.reroute("node registered for removal from cluster", Priority.NORMAL, new ActionListener<ClusterState>() {
96+
.reroute("node registered for removal from cluster", Priority.URGENT, new ActionListener<ClusterState>() {
9797
@Override
9898
public void onResponse(ClusterState clusterState) {
9999
logger.trace("started reroute after deleting node [{}}] shutdown", request.getNodeId());

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void clusterStateProcessed(ClusterState oldState, ClusterState newState)
105105
if (SingleNodeShutdownMetadata.Type.REMOVE.equals(request.getType())
106106
|| SingleNodeShutdownMetadata.Type.REPLACE.equals(request.getType())) {
107107
clusterService.getRerouteService()
108-
.reroute("node registered for removal from cluster", Priority.NORMAL, new ActionListener<ClusterState>() {
108+
.reroute("node registered for removal from cluster", Priority.URGENT, new ActionListener<ClusterState>() {
109109
@Override
110110
public void onResponse(ClusterState clusterState) {
111111
logger.trace("started reroute after registering node [{}] for removal", request.getNodeId());

0 commit comments

Comments
 (0)