Repository: ignite Updated Branches: refs/heads/ignite-zk e39ebde17 -> 00f41c195
zk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/00f41c19 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/00f41c19 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/00f41c19 Branch: refs/heads/ignite-zk Commit: 00f41c19500daa77ea28519c65a56d40b7635788 Parents: e39ebde Author: sboikov <sboi...@gridgain.com> Authored: Wed Dec 20 13:54:04 2017 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Wed Dec 20 14:02:06 2017 +0300 ---------------------------------------------------------------------- .../spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java | 8 +++++++- .../zk/internal/ZookeeperDiscoverySpiBasicTest.java | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/00f41c19/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java b/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java index 91d8e3a..ee8b7b4 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoveryImpl.java @@ -3001,6 +3001,11 @@ public class ZookeeperDiscoveryImpl { /** {@inheritDoc} */ @Override public void run() { + ZkCommunicationErrorProcessFuture commErrFut = commErrProcFut.get(); + + if (commErrFut != null) + commErrFut.onError(new IgniteCheckedException("Client node disconnected.")); + rtState.closing = true; busyLock.block(); @@ -3269,6 +3274,7 @@ public class ZookeeperDiscoveryImpl { private final ZkRuntimeState rtState; /** + * @param rtState Runtime state. * @param node Node. */ PingFuture(ZkRuntimeState rtState, ZookeeperClusterNode node) { @@ -3321,7 +3327,7 @@ public class ZookeeperDiscoveryImpl { /** {@inheritDoc} */ @Override public boolean onDone(@Nullable Boolean res, @Nullable Throwable err) { if (super.onDone(res, err)) { - pingFuts.remove(node.id(), this); + pingFuts.remove(node.order(), this); return true; } http://git-wip-us.apache.org/repos/asf/ignite/blob/00f41c19/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java index 0f4b0e7..b5e6791 100644 --- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java +++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/zk/internal/ZookeeperDiscoverySpiBasicTest.java @@ -388,7 +388,7 @@ public class ZookeeperDiscoverySpiBasicTest extends GridCommonAbstractTest { @Override public boolean apply() { return res.get() == null; } - }, 5000); + }, 30_000); assertNull(res.get()); } @@ -2193,7 +2193,7 @@ public class ZookeeperDiscoverySpiBasicTest extends GridCommonAbstractTest { ZkTestCommunicationSpi.spi(ignite(0)).initCheckResult(3, 0, 1); ZkTestCommunicationSpi.spi(ignite(1)).initCheckResult(3, 0, 1); - ZkTestCommunicationSpi.spi(ignite(0)).initCheckResult(3, 2); + ZkTestCommunicationSpi.spi(ignite(2)).initCheckResult(3, 2); UUID killedId = nodeId(2);