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/11/09 10:50:14 UTC

[31/49] ignite git commit: ignite-1843 Reverted forceKey futures cancel on stop.

ignite-1843 Reverted forceKey futures cancel on stop.


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

Branch: refs/heads/ignite-1537
Commit: 7adfd4a5690c235035b776e2ec6addc92b288030
Parents: 0354db1
Author: sboikov <sb...@gridgain.com>
Authored: Wed Nov 4 14:16:42 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Wed Nov 4 14:16:42 2015 +0300

----------------------------------------------------------------------
 .../dht/preloader/GridDhtPreloader.java         | 20 --------------------
 1 file changed, 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7adfd4a5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index fe85968..998c720 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -96,9 +96,6 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
     private ConcurrentMap<AffinityTopologyVersion, GridDhtAssignmentFetchFuture> pendingAssignmentFetchFuts =
         new ConcurrentHashMap8<>();
 
-    /** Stop flag. */
-    private volatile boolean stopping;
-
     /** Discovery listener. */
     private final GridLocalEventListener discoLsnr = new GridLocalEventListener() {
         @Override public void onEvent(Event evt) {
@@ -221,8 +218,6 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
         if (log.isDebugEnabled())
             log.debug("DHT rebalancer onKernalStop callback.");
 
-        stopping = true;
-
         cctx.events().removeListener(discoLsnr);
 
         // Acquire write busy lock.
@@ -234,11 +229,6 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
         if (demandPool != null)
             demandPool.stop();
 
-        IgniteCheckedException err = stopError();
-
-        for (GridDhtForceKeysFuture fut : forceKeyFuts.values())
-            fut.onDone(err);
-
         top = null;
     }
 
@@ -605,9 +595,6 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
      */
     void addFuture(GridDhtForceKeysFuture<?, ?> fut) {
         forceKeyFuts.put(fut.futureId(), fut);
-
-        if (stopping)
-            fut.onDone(stopError());
     }
 
     /**
@@ -619,13 +606,6 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
         forceKeyFuts.remove(fut.futureId(), fut);
     }
 
-    /**
-     * @return Node stop exception.
-     */
-    private IgniteCheckedException stopError() {
-        return new IgniteCheckedException("Operation has been cancelled (cache or node is stopping).");
-    }
-
     /** {@inheritDoc} */
     @Override public void dumpDebugInfo() {
         if (!forceKeyFuts.isEmpty()) {