Repository: ignite Updated Branches: refs/heads/master 201769640 -> ac85a7abe
Fixed condition in GridDiscoveryManager.reconnectSupported Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ac85a7ab Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ac85a7ab Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ac85a7ab Branch: refs/heads/master Commit: ac85a7abe4d0da7bdd8a013e5cbd4976b26e0be7 Parents: 2017696 Author: sboikov <sboi...@gridgain.com> Authored: Thu May 18 12:15:39 2017 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Thu May 18 12:15:39 2017 +0300 ---------------------------------------------------------------------- .../apache/ignite/internal/IgniteNeedReconnectException.java | 2 +- .../internal/managers/discovery/GridDiscoveryManager.java | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/ac85a7ab/modules/core/src/main/java/org/apache/ignite/internal/IgniteNeedReconnectException.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNeedReconnectException.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNeedReconnectException.java index 61ab576..f384950 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteNeedReconnectException.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteNeedReconnectException.java @@ -35,6 +35,6 @@ public class IgniteNeedReconnectException extends IgniteCheckedException { public IgniteNeedReconnectException(ClusterNode locNode, @Nullable Throwable cause) { super("Local node need try to reconnect [locNodeId=" + locNode.id() + ']', cause); - assert locNode.isClient(); + assert locNode.isClient() : locNode; } } http://git-wip-us.apache.org/repos/asf/ignite/blob/ac85a7ab/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java index 24c7283..656b04a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java @@ -73,7 +73,6 @@ import org.apache.ignite.internal.processors.cache.DynamicCacheDescriptor; import org.apache.ignite.internal.processors.cache.GridCacheAdapter; import org.apache.ignite.internal.processors.jobmetrics.GridJobMetrics; import org.apache.ignite.internal.processors.security.SecurityContext; -import org.apache.ignite.internal.processors.service.GridServiceProcessor; import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor; import org.apache.ignite.internal.util.GridBoundedConcurrentLinkedHashMap; import org.apache.ignite.internal.util.GridSpinBusyLock; @@ -165,7 +164,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> { private static final String PREFIX = "Topology snapshot"; /** Discovery cached history size. */ - static final int DISCOVERY_HISTORY_SIZE = getInteger(IGNITE_DISCOVERY_HISTORY_SIZE, 500); + private static final int DISCOVERY_HISTORY_SIZE = getInteger(IGNITE_DISCOVERY_HISTORY_SIZE, 500); /** Predicate filtering out daemon nodes. */ private static final IgnitePredicate<ClusterNode> FILTER_DAEMON = new P1<ClusterNode>() { @@ -1965,7 +1964,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> { public boolean reconnectSupported() { DiscoverySpi spi = getSpi(); - return ctx.clientNode() && (spi instanceof TcpDiscoverySpi) && + return ctx.discovery().localNode().isClient() && (spi instanceof TcpDiscoverySpi) && !(((TcpDiscoverySpi) spi).isClientReconnectDisabled()); }