Ack node shutdown requests after cluster state update is complete#85846
Ack node shutdown requests after cluster state update is complete#85846rjernst merged 4 commits intoelastic:masterfrom
Conversation
The adding or removing a node to the node shutdown api stores submits a cluster state update task to store the node metadata to be shutdown. Sometimes a reroute is required, and in those cases we currently wait for the reroute to complete before acknowledging the original request. This commit changes the behavior to acknowledge success after the cluster state update is complete. A warning is still logged if the reroute fails. relates elastic#84847
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
|
|
||
| @Override | ||
| public void clusterStateProcessed(ClusterState oldState, ClusterState newState) { | ||
| listener.onResponse(AcknowledgedResponse.TRUE); |
There was a problem hiding this comment.
I suggest completing the listener after submitting the task to the reroute service, so that if there's ever a need to wait for the followup reroute to complete you can safely do so with GET _cluster/health?wait_for_events=languid.
There was a problem hiding this comment.
I suggest completing the listener after submitting the task to the reroute service, so that if there's ever a need to wait for the followup reroute to complete you can safely do so with GET _cluster/health?wait_for_events=languid.
(sorry for the noise, repeating my previous comment in a new review)
DaveCTurner
left a comment
There was a problem hiding this comment.
Sorry, forgot to mark my previous review as request changes, resubmitting...
|
|
||
| @Override | ||
| public void clusterStateProcessed(ClusterState oldState, ClusterState newState) { | ||
| listener.onResponse(AcknowledgedResponse.TRUE); |
There was a problem hiding this comment.
I suggest completing the listener after submitting the task to the reroute service, so that if there's ever a need to wait for the followup reroute to complete you can safely do so with GET _cluster/health?wait_for_events=languid.
(sorry for the noise, repeating my previous comment in a new review)
The adding or removing a node to the node shutdown api stores submits a
cluster state update task to store the node metadata to be shutdown.
Sometimes a reroute is required, and in those cases we currently wait
for the reroute to complete before acknowledging the original request.
This commit changes the behavior to acknowledge success after the
cluster state update is complete. A warning is still logged if the
reroute fails.
relates #84847