From 1f8db672fc9ad7d479b3b5885145e409aa6aa1c8 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Tue, 2 Sep 2014 23:21:35 +0200 Subject: [PATCH] [Internal] Do not use a background thread to disconnect node which are 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 --- .../cluster/service/InternalClusterService.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java b/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java index c5fe004f8b9..02a17752db5 100644 --- a/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java +++ b/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java @@ -443,15 +443,12 @@ public class InternalClusterService extends AbstractLifecycleComponent