You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/07/16 08:05:30 UTC
[1/4] incubator-ignite git commit: ignite-1085: reimplemented
Repository: incubator-ignite
Updated Branches:
refs/heads/master cd3a9b61b -> 77da7288f
ignite-1085: reimplemented
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/24aae82f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/24aae82f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/24aae82f
Branch: refs/heads/master
Commit: 24aae82fabfebcbeb13516c3f3361ac5d726d20f
Parents: 7147f3d
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 15 13:53:53 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 15 13:53:53 2015 +0300
----------------------------------------------------------------------
.../managers/discovery/GridDiscoveryManager.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/24aae82f/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 eae07ed..1bac4d0 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
@@ -376,6 +376,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
});
}
+ final CountDownLatch startLatch = new CountDownLatch(1);
+
spi.setListener(new DiscoverySpiListener() {
@Override public void onDiscovery(
int type,
@@ -464,6 +466,13 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
// If this is a local join event, just save it and do not notify listeners.
if (type == EVT_NODE_JOINED && node.id().equals(locNode.id())) {
+ updateTopologyVersionIfGreater(new AffinityTopologyVersion(locNode.order()),
+ new DiscoCache(localNode(), getSpi().getRemoteNodes()));
+
+ assert startLatch.getCount() == 1;
+
+ startLatch.countDown();
+
DiscoveryEvent discoEvt = new DiscoveryEvent();
discoEvt.node(ctx.discovery().localNode());
@@ -527,6 +536,13 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
startSpi();
+ try {
+ U.await(startLatch);
+ }
+ catch (IgniteInterruptedException e) {
+ throw new IgniteCheckedException("Failed to start discovery manager (thread has been interrupted).", e);
+ }
+
// Start segment check worker only if frequency is greater than 0.
if (hasRslvrs && segChkFreq > 0) {
segChkWrk = new SegmentCheckWorker();
@@ -538,9 +554,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
locNode = spi.getLocalNode();
- updateTopologyVersionIfGreater(new AffinityTopologyVersion(locNode.order()), new DiscoCache(localNode(),
- getSpi().getRemoteNodes()));
-
checkAttributes(discoCache().remoteNodes());
// Start discovery worker.
[2/4] incubator-ignite git commit: ignite-1085: reimplemented
Posted by sb...@apache.org.
ignite-1085: reimplemented
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/f0ace1f9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/f0ace1f9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/f0ace1f9
Branch: refs/heads/master
Commit: f0ace1f997b3e7b7a0692870aba4fd80302f9813
Parents: 24aae82
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 15 14:03:50 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 15 14:03:50 2015 +0300
----------------------------------------------------------------------
.../discovery/GridDiscoveryManager.java | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f0ace1f9/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 1bac4d0..b35628c 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
@@ -193,6 +193,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
super(ctx, ctx.config().getDiscoverySpi());
}
+ /** */
+ private final CountDownLatch startLatch = new CountDownLatch(1);
+
/**
* @return Memory usage of non-heap memory.
*/
@@ -376,8 +379,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
});
}
- final CountDownLatch startLatch = new CountDownLatch(1);
-
spi.setListener(new DiscoverySpiListener() {
@Override public void onDiscovery(
int type,
@@ -1052,6 +1053,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
/** {@inheritDoc} */
@Override public void onKernalStop0(boolean cancel) {
+ startLatch.countDown();
+
// Stop segment check worker.
if (segChkWrk != null) {
segChkWrk.cancel();
@@ -1224,16 +1227,9 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
* @return Discovery collection cache.
*/
public DiscoCache discoCache() {
- Snapshot cur;
-
- while ((cur = topSnap.get()) == null) {
- // Wrap the SPI collection to avoid possible floating collection.
- if (topSnap.compareAndSet(null, cur = new Snapshot(
- AffinityTopologyVersion.ZERO,
- new DiscoCache(localNode(), getSpi().getRemoteNodes())))) {
- return cur.discoCache;
- }
- }
+ Snapshot cur = topSnap.get();
+
+ assert cur != null;
return cur.discoCache;
}
[4/4] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/ignite-1085'
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/ignite-1085'
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/77da7288
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/77da7288
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/77da7288
Branch: refs/heads/master
Commit: 77da7288f61868cf344fde68ced65cfe747d765b
Parents: cd3a9b6 d11fc9b
Author: Denis Magda <dm...@gridgain.com>
Authored: Thu Jul 16 09:05:06 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Thu Jul 16 09:05:06 2015 +0300
----------------------------------------------------------------------
.../discovery/GridDiscoveryManager.java | 35 ++++++++++++--------
1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
[3/4] incubator-ignite git commit: Merge remote-tracking branch
'remotes/origin/master' into ignite-1085
Posted by sb...@apache.org.
Merge remote-tracking branch 'remotes/origin/master' into ignite-1085
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/d11fc9b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/d11fc9b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/d11fc9b0
Branch: refs/heads/master
Commit: d11fc9b0811f33e8d1e3f1d2eeabac0504952833
Parents: f0ace1f a6d33b1
Author: Denis Magda <dm...@gridgain.com>
Authored: Wed Jul 15 14:18:16 2015 +0300
Committer: Denis Magda <dm...@gridgain.com>
Committed: Wed Jul 15 14:18:16 2015 +0300
----------------------------------------------------------------------
.../IgniteCacheAtomicReplicatedNodeRestartSelfTest.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------