Added more trace logging related to finding master.

This commit is contained in:
Martijn van Groningen 2013-02-12 21:38:03 +01:00
parent 5519f80abb
commit 3a2d40acd9
2 changed files with 4 additions and 1 deletions

View File

@ -279,6 +279,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> 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<Discovery> 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<Discovery> implemen
private DiscoveryNode findMaster() {
ZenPing.PingResponse[] fullPingResponses = pingService.pingAndWait(pingTimeout);
if (fullPingResponses == null) {
logger.trace("No full ping responses");
return null;
}
if (logger.isTraceEnabled()) {

View File

@ -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<ZenPing> implemen
latch.await();
return response.get();
} catch (InterruptedException e) {
logger.trace("pingAndWait interrupted");
return null;
}
}