Repository: ignite Updated Branches: refs/heads/ignite-zk 556a5dff6 -> 4d14eaf89
zk Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4d14eaf8 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4d14eaf8 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4d14eaf8 Branch: refs/heads/ignite-zk Commit: 4d14eaf892ab2bdd3e53fbece1b8b26d06248eb0 Parents: 556a5df Author: sboikov <sboi...@gridgain.com> Authored: Fri Dec 8 15:40:47 2017 +0300 Committer: sboikov <sboi...@gridgain.com> Committed: Fri Dec 8 15:40:47 2017 +0300 ---------------------------------------------------------------------- .../processors/cache/CacheAffinitySharedManager.java | 9 +++------ .../processors/continuous/GridContinuousProcessor.java | 10 ++++++++-- .../cache/IgniteDaemonNodeMarshallerCacheTest.java | 3 ++- 3 files changed, 13 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/4d14eaf8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java index 8441a5e..608d664 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java @@ -1273,20 +1273,17 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap * @param fut Current exchange future. * @param msg Message finish message. * @param resTopVer Result topology version. - * @throws IgniteCheckedException If failed. */ public void onLocalJoin(final GridDhtPartitionsExchangeFuture fut, GridDhtPartitionsFullMessage msg, - final AffinityTopologyVersion resTopVer) - throws IgniteCheckedException { + final AffinityTopologyVersion resTopVer) { final Set<Integer> affReq = fut.context().groupsAffinityRequestOnJoin(); final Map<Long, ClusterNode> nodesByOrder = new HashMap<>(); final Map<Integer, CacheGroupAffinityMessage> joinedNodeAff = msg.joinedNodeAffinity(); - assert !F.isEmpty(joinedNodeAff) : msg; - assert joinedNodeAff.size() >= affReq.size(); + assert F.isEmpty(affReq) || (!F.isEmpty(joinedNodeAff) && joinedNodeAff.size() >= affReq.size()) : msg; forAllCacheGroups(false, new IgniteInClosureX<GridAffinityAssignmentCache>() { @Override public void applyx(GridAffinityAssignmentCache aff) throws IgniteCheckedException { @@ -1296,7 +1293,7 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap assert grp != null; - if (affReq.contains(aff.groupId())) { + if (affReq != null && affReq.contains(aff.groupId())) { assert AffinityTopologyVersion.NONE.equals(aff.lastVersion()); CacheGroupAffinityMessage affMsg = joinedNodeAff.get(aff.groupId()); http://git-wip-us.apache.org/repos/asf/ignite/blob/4d14eaf8/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java index 2e5bf47..0210dd3 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/continuous/GridContinuousProcessor.java @@ -164,11 +164,11 @@ public class GridContinuousProcessor extends GridProcessorAdapter { /** {@inheritDoc} */ @Override public void start() throws IgniteCheckedException { + discoProtoVer = ctx.config().getDiscoverySpi() instanceof TcpDiscoverySpi ? 1 : 2; + if (ctx.config().isDaemon()) return; - discoProtoVer = ctx.config().getDiscoverySpi() instanceof TcpDiscoverySpi ? 1 : 2; - if (discoProtoVer == 2) routinesInfo = new ContinuousRoutinesInfo(); @@ -375,6 +375,9 @@ public class GridContinuousProcessor extends GridProcessorAdapter { /** {@inheritDoc} */ @Override public void collectJoiningNodeData(DiscoveryDataBag dataBag) { + if (ctx.isDaemon()) + return; + if (discoProtoVer == 2) { routinesInfo.collectJoiningNodeData(dataBag); @@ -389,6 +392,9 @@ public class GridContinuousProcessor extends GridProcessorAdapter { /** {@inheritDoc} */ @Override public void collectGridNodeData(DiscoveryDataBag dataBag) { + if (ctx.isDaemon()) + return; + if (discoProtoVer == 2) { routinesInfo.collectGridNodeData(dataBag); http://git-wip-us.apache.org/repos/asf/ignite/blob/4d14eaf8/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java index 566860d..2f9bd53 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDaemonNodeMarshallerCacheTest.java @@ -79,7 +79,7 @@ public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest * @param startFirst If {@code true} daemon node is started first. * @throws Exception If failed. */ - public void marshalOnDaemonNode(boolean startFirst) throws Exception { + private void marshalOnDaemonNode(boolean startFirst) throws Exception { int nodeIdx = 0; if (!startFirst) { @@ -92,6 +92,7 @@ public class IgniteDaemonNodeMarshallerCacheTest extends GridCommonAbstractTest Ignite daemonNode = startGrid(nodeIdx++); + assertTrue(daemonNode.cluster().localNode().isDaemon()); assertEquals("true", daemonNode.cluster().localNode().attribute(ATTR_DAEMON)); daemon = false;