Repository: ignite Updated Branches: refs/heads/ignite-comm-balance-master 9339e9159 -> 18229e8a5
communications connections logging and paired connections for servers, Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/18229e8a Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/18229e8a Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/18229e8a Branch: refs/heads/ignite-comm-balance-master Commit: 18229e8a5963a9b6f5b7c7a4ca3872270bcacf90 Parents: 9339e91 Author: Yakov Zhdanov <yzhda...@gridgain.com> Authored: Mon Jan 16 17:03:43 2017 +0300 Committer: Yakov Zhdanov <yzhda...@gridgain.com> Committed: Mon Jan 16 17:03:43 2017 +0300 ---------------------------------------------------------------------- .../main/java/org/apache/ignite/BenchAtomic.java | 3 +-- .../communication/tcp/TcpCommunicationSpi.java | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/18229e8a/modules/core/src/main/java/org/apache/ignite/BenchAtomic.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/BenchAtomic.java b/modules/core/src/main/java/org/apache/ignite/BenchAtomic.java index f2c0c73..7a2e3eb 100644 --- a/modules/core/src/main/java/org/apache/ignite/BenchAtomic.java +++ b/modules/core/src/main/java/org/apache/ignite/BenchAtomic.java @@ -228,8 +228,7 @@ public class BenchAtomic { return new CacheConfiguration<K, V>() .setName("1") .setAtomicityMode(CacheAtomicityMode.ATOMIC) - // .setAffinity(new FairAffinityFunction(1024)) - .setBackups(0) + .setBackups(1) .setAtomicWriteOrderMode(CacheAtomicWriteOrderMode.PRIMARY) .setRebalanceMode(CacheRebalanceMode.SYNC) .setCopyOnRead(false) http://git-wip-us.apache.org/repos/asf/ignite/blob/18229e8a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java index ae0e6f0..be79414 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java @@ -360,6 +360,10 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter @Override public void onConnected(GridNioSession ses) { if (ses.accepted()) { + if (log.isInfoEnabled()) + log.info("Accepted incoming communication connection [locAddr=" + ses.localAddress() + + ", rmtAddr=" + ses.remoteAddress() + ']'); + if (log.isDebugEnabled()) log.debug("Sending local node ID to newly accepted session: " + ses); @@ -370,6 +374,11 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter U.error(log, "Failed to send message: " + e, e); } } + else { + if (log.isInfoEnabled()) + log.info("Established outgoing communication connection [locAddr=" + ses.localAddress() + + ", rmtAddr=" + ses.remoteAddress() + ']'); + } } @Override public void onDisconnected(GridNioSession ses, @Nullable Exception e) { @@ -979,7 +988,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter private IpcSharedMemoryServerEndpoint shmemSrv; /** */ - private boolean usePairedConnections; + private Boolean usePairedConnections; /** */ private int connectionsPerNode = DFLT_CONN_PER_NODE; @@ -1113,6 +1122,11 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter if (ignite != null) { setAddressResolver(ignite.configuration().getAddressResolver()); setLocalAddress(ignite.configuration().getLocalHost()); + + if (usePairedConnections == null) { + // If not set, by default should be true for server and false for client. + usePairedConnections = !ignite.configuration().isClientMode(); + } } } @@ -1181,7 +1195,7 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter /** {@inheritDoc} */ @Override public boolean isUsePairedConnections() { - return usePairedConnections; + return usePairedConnections == null ? false : usePairedConnections; } /**