New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use a background thread to disconnect node which are removed from the ClusterState #7543
Closed
bleskes
wants to merge
3
commits into
elastic:master
from
bleskes:verify_before_disconnect_on_update_task
Closed
Do not use a background thread to disconnect node which are removed from the ClusterState #7543
bleskes
wants to merge
3
commits into
elastic:master
from
bleskes:verify_before_disconnect_on_update_task
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ing it (after a ping failure) After a node fails to respond to a ping correctly (master or node fault detection), they are removed from the cluster state through an UpdateTask. When a node is removed, a background task is scheduled using the generic threadpool to actually disconnect the node. However, in the case of temporary node failures (for example) it may be that the node was re-added by the time the task get executed. We should check for that.
I think simpler solution is just to remove the execution on a different thread, disconnect should be super cheap |
@kimchy updated with another commit. I'll change the description before pushing (assuming no more feedback) |
just to be safe, I would wrap each disconnect in a try ... catch block, similar to the connect code before. Other than that, LGTM. |
bleskes
added a commit
that referenced
this pull request
Sep 3, 2014
…e remove from the ClusterState After a node fails to respond to a ping correctly (master or node fault detection), they are removed from the cluster state through an UpdateTask. When a node is removed, a background task is scheduled using the generic threadpool to actually disconnect the node. However, in the case of temporary node failures (for example) it may be that the node was re-added by the time the task get executed, causing an untimely disconnect call. Disconnect is cheep and should be done during the UpdateTask. Closes #7543
bleskes
changed the title
[Internal] verify node is no longer in ClusterState before disconnecting it (after a ping failure)
[Internal] Do not use a background thread to disconnect node which are removed from the ClusterState
Sep 3, 2014
bleskes
added a commit
that referenced
this pull request
Sep 8, 2014
…e remove from the ClusterState After a node fails to respond to a ping correctly (master or node fault detection), they are removed from the cluster state through an UpdateTask. When a node is removed, a background task is scheduled using the generic threadpool to actually disconnect the node. However, in the case of temporary node failures (for example) it may be that the node was re-added by the time the task get executed, causing an untimely disconnect call. Disconnect is cheep and should be done during the UpdateTask. Closes #7543
clintongormley
changed the title
[Internal] Do not use a background thread to disconnect node which are removed from the ClusterState
Internal: Do not use a background thread to disconnect node which are removed from the ClusterState
Sep 8, 2014
clintongormley
changed the title
Internal: Do not use a background thread to disconnect node which are removed from the ClusterState
Resiliency: Do not use a background thread to disconnect node which are removed from the ClusterState
Sep 8, 2014
clintongormley
changed the title
Resiliency: Do not use a background thread to disconnect node which are removed from the ClusterState
Do not use a background thread to disconnect node which are removed from the ClusterState
Jun 7, 2015
clintongormley
added
:Distributed/Distributed
A catch all label for anything in the Distributed Area. If you aren't sure, use this one.
and removed
:Cluster
labels
Feb 13, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Distributed/Distributed
A catch all label for anything in the Distributed Area. If you aren't sure, use this one.
>enhancement
resiliency
v1.4.0.Beta1
v2.0.0-beta1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After a node fails to respond to a ping correctly (master or node fault detection), they are removed from the cluster state through an UpdateTask. When a node is removed, a background task is scheduled using the generic threadpool to actually disconnect the node. However, in the case of temporary node failures (for example) it may be that the node was re-added by the time the task get executed, causing an untimely disconnect call. Disconnect is cheep and should be done during the UpdateTask.