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/12/01 13:25:30 UTC
[1/2] ignite git commit: ignite-1.5 Skip message send on node stop.
Repository: ignite
Updated Branches:
refs/heads/ignite-1.5 74054fb04 -> 74f93b650
ignite-1.5 Skip message send on node stop.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3e7c532d
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3e7c532d
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3e7c532d
Branch: refs/heads/ignite-1.5
Commit: 3e7c532d83fc41b4c8439f30f4157d84bbc3fa08
Parents: 74054fb
Author: sboikov <sb...@gridgain.com>
Authored: Tue Dec 1 15:22:28 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Dec 1 15:22:28 2015 +0300
----------------------------------------------------------------------
.../distributed/dht/preloader/GridDhtPartitionDemander.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/3e7c532d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 20f12b6..728e792 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -861,8 +861,10 @@ public class GridDhtPartitionDemander {
U.log(log, "Cancelled rebalancing from all nodes [cache=" + cctx.name()
+ ", topology=" + topologyVersion());
- for (UUID nodeId : remaining.keySet())
- cleanupRemoteContexts(nodeId);
+ if (!cctx.kernalContext().isStopping()) {
+ for (UUID nodeId : remaining.keySet())
+ cleanupRemoteContexts(nodeId);
+ }
remaining.clear();
@@ -920,7 +922,6 @@ public class GridDhtPartitionDemander {
//Check remote node rebalancing API version.
if (node.version().compareTo(GridDhtPreloader.REBALANCING_VER_2_SINCE) >= 0) {
-
GridDhtPartitionDemandMessage d = new GridDhtPartitionDemandMessage(
-1/* remove supply context signal */, this.topologyVersion(), cctx.cacheId());
[2/2] ignite git commit: ignite-1.5 Skip message send on node stop.
Posted by sb...@apache.org.
ignite-1.5 Skip message send on node stop.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/74f93b65
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/74f93b65
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/74f93b65
Branch: refs/heads/ignite-1.5
Commit: 74f93b650c40b8551b333dfbc486e549fc38f41e
Parents: 3e7c532
Author: sboikov <sb...@gridgain.com>
Authored: Tue Dec 1 15:25:11 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Tue Dec 1 15:25:11 2015 +0300
----------------------------------------------------------------------
.../dht/preloader/GridDhtPartitionDemander.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/74f93b65/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 728e792..eb9e97f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -283,7 +283,7 @@ public class GridDhtPartitionDemander {
* @param force {@code True} if dummy reassign.
* @param caches Rebalancing of these caches will be finished before this started.
* @param cnt Counter.
- * @throws IgniteCheckedException Exception
+ * @throws IgniteCheckedException If failed.
*/
Callable<Boolean> addAssignments(final GridDhtPreloaderAssignments assigns, boolean force,
final Collection<String> caches, int cnt) {
@@ -741,7 +741,7 @@ public class GridDhtPartitionDemander {
private static final long serialVersionUID = 1L;
/** Should EVT_CACHE_REBALANCE_STOPPED event be sent of not. */
- private final boolean sendStoppedEvnt;
+ private final boolean sndStoppedEvnt;
/** */
private final GridCacheContext<?, ?> cctx;
@@ -770,6 +770,7 @@ public class GridDhtPartitionDemander {
* @param cctx Context.
* @param log Logger.
* @param sentStopEvnt Stop event flag.
+ * @param updateSeq Update sequence.
*/
RebalanceFuture(GridDhtPreloaderAssignments assigns,
GridCacheContext<?, ?> cctx,
@@ -782,7 +783,7 @@ public class GridDhtPartitionDemander {
this.topVer = assigns.topologyVersion();
this.cctx = cctx;
this.log = log;
- this.sendStoppedEvnt = sentStopEvnt;
+ this.sndStoppedEvnt = sentStopEvnt;
this.updateSeq = updateSeq;
}
@@ -794,7 +795,7 @@ public class GridDhtPartitionDemander {
this.topVer = null;
this.cctx = null;
this.log = null;
- this.sendStoppedEvnt = false;
+ this.sndStoppedEvnt = false;
this.updateSeq = -1;
}
@@ -1007,7 +1008,7 @@ public class GridDhtPartitionDemander {
*/
private void checkIsDone(boolean cancelled) {
if (remaining.isEmpty()) {
- if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_STOPPED) && (!cctx.isReplicated() || sendStoppedEvnt))
+ if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_STOPPED) && (!cctx.isReplicated() || sndStoppedEvnt))
preloadEvent(EVT_CACHE_REBALANCE_STOPPED, exchFut.discoveryEvent());
if (log.isDebugEnabled())
@@ -1385,6 +1386,7 @@ public class GridDhtPartitionDemander {
/**
* @param node Node.
* @param d D.
+ * @throws IgniteCheckedException If failed.
*/
public void run(ClusterNode node, GridDhtPartitionDemandMessage d) throws IgniteCheckedException {
demandLock.readLock().lock();