From a6d84f594256c2abeafe634d0429f3c0214bd5e1 Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 11 Aug 2010 13:20:13 +0300 Subject: [PATCH] no need to spawn a thread when response to a ping response --- .../discovery/zen/fd/MasterFaultDetection.java | 6 ++++++ .../elasticsearch/discovery/zen/fd/NodesFaultDetection.java | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java index d65f3a633ca..6f2b6dffa6d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java @@ -319,6 +319,12 @@ public class MasterFaultDetection extends AbstractComponent { // send a response, and note if we are connected to the master or not channel.sendResponse(new MasterPingResponseResponse(nodes.nodeExists(request.nodeId))); } + + + @Override public boolean spawn() { + // no need to spawn here, we just send a response + return false; + } } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java index aa4879f9765..c544e61e846 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/zen/fd/NodesFaultDetection.java @@ -266,6 +266,11 @@ public class NodesFaultDetection extends AbstractComponent { } channel.sendResponse(new PingResponse()); } + + @Override public boolean spawn() { + // no need to spawn here, we just send a response + return false; + } }