Added more trace logging related to finding master.
This commit is contained in:
parent
5519f80abb
commit
3a2d40acd9
|
@ -279,6 +279,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implemen
|
||||||
private void asyncJoinCluster() {
|
private void asyncJoinCluster() {
|
||||||
if (currentJoinThread != null) {
|
if (currentJoinThread != null) {
|
||||||
// we are already joining, ignore...
|
// we are already joining, ignore...
|
||||||
|
logger.trace("a join thread already running");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
threadPool.generic().execute(new Runnable() {
|
threadPool.generic().execute(new Runnable() {
|
||||||
|
@ -303,6 +304,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implemen
|
||||||
retry = false;
|
retry = false;
|
||||||
DiscoveryNode masterNode = findMaster();
|
DiscoveryNode masterNode = findMaster();
|
||||||
if (masterNode == null) {
|
if (masterNode == null) {
|
||||||
|
logger.trace("no masterNode returned");
|
||||||
retry = true;
|
retry = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -628,6 +630,7 @@ public class ZenDiscovery extends AbstractLifecycleComponent<Discovery> implemen
|
||||||
private DiscoveryNode findMaster() {
|
private DiscoveryNode findMaster() {
|
||||||
ZenPing.PingResponse[] fullPingResponses = pingService.pingAndWait(pingTimeout);
|
ZenPing.PingResponse[] fullPingResponses = pingService.pingAndWait(pingTimeout);
|
||||||
if (fullPingResponses == null) {
|
if (fullPingResponses == null) {
|
||||||
|
logger.trace("No full ping responses");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (logger.isTraceEnabled()) {
|
if (logger.isTraceEnabled()) {
|
||||||
|
|
|
@ -39,7 +39,6 @@ import org.elasticsearch.threadpool.ThreadPool;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -129,6 +128,7 @@ public class ZenPingService extends AbstractLifecycleComponent<ZenPing> implemen
|
||||||
latch.await();
|
latch.await();
|
||||||
return response.get();
|
return response.get();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
logger.trace("pingAndWait interrupted");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue