ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [22/22] ignite git commit: 1093
Date Fri, 11 Sep 2015 11:36:33 GMT
1093


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/d74cdbcc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/d74cdbcc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/d74cdbcc

Branch: refs/heads/ignite-1093-2
Commit: d74cdbcc70166bfd636661cd763c31e929d7246b
Parents: 6292654
Author: Anton Vinogradov <av@apache.org>
Authored: Fri Sep 11 14:35:41 2015 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Fri Sep 11 14:35:41 2015 +0300

----------------------------------------------------------------------
 .../dht/preloader/GridDhtPartitionDemander.java         | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d74cdbcc/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 b55e626..bf2f36a 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
@@ -123,7 +123,7 @@ public class GridDhtPartitionDemander {
 
         boolean enabled = cctx.rebalanceEnabled() && !cctx.kernalContext().clientNode();
 
-        syncFut = new SyncFuture(null, cctx, log);
+        syncFut = new SyncFuture(null, cctx, log, true);
 
         if (!enabled)
             // Calling onDone() immediately since preloading is disabled.
@@ -230,7 +230,7 @@ public class GridDhtPartitionDemander {
                 if (!fut.isDone())
                     fut.onCancel();
 
-                fut = new SyncFuture(assigns, cctx, log);
+                fut = new SyncFuture(assigns, cctx, log, false);
 
                 syncFut = fut;
             }
@@ -787,13 +787,17 @@ public class GridDhtPartitionDemander {
         /** Completed. */
         private volatile boolean completed = true;
 
+        private volatile boolean sendStopEvnt = false;
+
         /**
          * @param assigns Assigns.
          */
-        SyncFuture(GridDhtPreloaderAssignments assigns, GridCacheContext<?, ?> cctx,
IgniteLogger log) {
+        SyncFuture(GridDhtPreloaderAssignments assigns, GridCacheContext<?, ?> cctx,
IgniteLogger log,
+            boolean sentStopEvnt) {
             this.assigns = assigns;
             this.cctx = cctx;
             this.log = log;
+            this.sendStopEvnt = sentStopEvnt;
         }
 
         /**
@@ -1007,7 +1011,7 @@ public class GridDhtPartitionDemander {
 
                 cctx.shared().exchange().scheduleResendPartitions();
 
-                if (!cctx.isReplicated() || cctx.events().isRecordable(EVT_CACHE_REBALANCE_STOPPED))
+                if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_STOPPED) && (!cctx.isReplicated()
|| sendStopEvnt))
                     preloadEvent(EVT_CACHE_REBALANCE_STOPPED, assigns.exchangeFuture().discoveryEvent());
 
                 if (lsnr != null)


Mime
View raw message