Squashed commit of the following: commit 5b39d5d97ae2cca59972be5602929f4df85599f3 Author: Denis Magda <dma...@gridgain.com> Date: Tue Jul 21 14:33:33 2015 +0300
ignite-1032: removed doc commit 99408c9d41e4a103011293f262b10e45b28e5a6a Merge: cd5d5cd 9aa928c Author: Denis Magda <dma...@gridgain.com> Date: Tue Jul 21 12:46:48 2015 +0300 Merge remote-tracking branch 'remotes/origin/master' into ignite-1032 commit cd5d5cdbb242c23b55fd8895738b1153dba14cb1 Merge: 22d3a17 f62744e Author: Denis Magda <dma...@gridgain.com> Date: Tue Jul 21 08:54:47 2015 +0300 Merge remote-tracking branch 'remotes/origin/master' into ignite-1032 commit 22d3a1767898ec9d9183dfb8429b79257641b8d7 Author: Denis Magda <dma...@gridgain.com> Date: Mon Jul 20 13:57:11 2015 +0300 ignite-1032: implemented Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f8a13174 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f8a13174 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f8a13174 Branch: refs/heads/ignite-gg-10212 Commit: f8a131745c4ea3d9a30cf5096cd3cbdc13abbbea Parents: 9aa928c Author: Denis Magda <dma...@gridgain.com> Authored: Tue Jul 21 14:35:35 2015 +0300 Committer: Denis Magda <dma...@gridgain.com> Committed: Tue Jul 21 14:35:35 2015 +0300 ---------------------------------------------------------------------- .../ignite/spi/discovery/tcp/ServerImpl.java | 58 ++++++++++++-------- 1 file changed, 34 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f8a13174/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java index 4861953..dc343eb 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java @@ -3536,7 +3536,7 @@ class ServerImpl extends TcpDiscoveryImpl { * * @param msg Status check message. */ - private void processStatusCheckMessage(TcpDiscoveryStatusCheckMessage msg) { + private void processStatusCheckMessage(final TcpDiscoveryStatusCheckMessage msg) { assert msg != null; UUID locNodeId = getLocalNodeId(); @@ -3576,35 +3576,45 @@ class ServerImpl extends TcpDiscoveryImpl { // Sender is not in topology, it should reconnect. msg.status(STATUS_RECON); - try { - trySendMessageDirectly(msg.creatorNode(), msg); + utilityPool.execute(new Runnable() { + @Override public void run() { + if (spiState == DISCONNECTED) { + if (log.isDebugEnabled()) + log.debug("Ignoring status check request, SPI is already disconnected: " + msg); - if (log.isDebugEnabled()) - log.debug("Responded to status check message " + - "[recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + ']'); - } - catch (IgniteSpiException e) { - if (e.hasCause(SocketException.class)) { - if (log.isDebugEnabled()) { - log.debug("Failed to respond to status check message (connection refused) " + - "[recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + ']'); + return; } - onException("Failed to respond to status check message (connection refused) " + - "[recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + ']', e); - } - else { - if (pingNode(msg.creatorNode())) { - // Node exists and accepts incoming connections. - U.error(log, "Failed to respond to status check message " + - "[recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + ']', e); + try { + trySendMessageDirectly(msg.creatorNode(), msg); + + if (log.isDebugEnabled()) + log.debug("Responded to status check message " + + "[recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + ']'); } - else if (log.isDebugEnabled()) { - log.debug("Failed to respond to status check message (did the node stop?) " + - "[recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + ']'); + catch (IgniteSpiException e) { + if (e.hasCause(SocketException.class)) { + if (log.isDebugEnabled()) + log.debug("Failed to respond to status check message (connection " + + "refused) [recipient=" + msg.creatorNodeId() + ", status=" + + msg.status() + ']'); + + onException("Failed to respond to status check message (connection refused) " + + "[recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + ']', e); + } + else { + if (pingNode(msg.creatorNode())) + // Node exists and accepts incoming connections. + U.error(log, "Failed to respond to status check message [recipient=" + + msg.creatorNodeId() + ", status=" + msg.status() + ']', e); + else if (log.isDebugEnabled()) + log.debug("Failed to respond to status check message (did the node " + + "stop?) [recipient=" + msg.creatorNodeId() + ", status=" + msg.status() + + ']'); + } } } - } + }); } return;