From 3a2d40acd9d536625b4b76069f4f9eeefccbebf3 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Tue, 12 Feb 2013 21:38:03 +0100 Subject: [PATCH] Added more trace logging related to finding master. --- .../java/org/elasticsearch/discovery/zen/ZenDiscovery.java | 3 +++ .../org/elasticsearch/discovery/zen/ping/ZenPingService.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java b/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java index 75687ddc092..cd73b5e6646 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java +++ b/src/main/java/org/elasticsearch/discovery/zen/ZenDiscovery.java @@ -279,6 +279,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent implemen private void asyncJoinCluster() { if (currentJoinThread != null) { // we are already joining, ignore... + logger.trace("a join thread already running"); return; } threadPool.generic().execute(new Runnable() { @@ -303,6 +304,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent implemen retry = false; DiscoveryNode masterNode = findMaster(); if (masterNode == null) { + logger.trace("no masterNode returned"); retry = true; continue; } @@ -628,6 +630,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent implemen private DiscoveryNode findMaster() { ZenPing.PingResponse[] fullPingResponses = pingService.pingAndWait(pingTimeout); if (fullPingResponses == null) { + logger.trace("No full ping responses"); return null; } if (logger.isTraceEnabled()) { diff --git a/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java b/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java index 6b0a20242c5..7150c258cfa 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java +++ b/src/main/java/org/elasticsearch/discovery/zen/ping/ZenPingService.java @@ -39,7 +39,6 @@ import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.transport.TransportService; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicInteger; @@ -129,6 +128,7 @@ public class ZenPingService extends AbstractLifecycleComponent implemen latch.await(); return response.get(); } catch (InterruptedException e) { + logger.trace("pingAndWait interrupted"); return null; } }