ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: 5578
Date Mon, 31 Jul 2017 08:31:35 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-5578 264f518ea -> 4d08653f7


5578


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

Branch: refs/heads/ignite-5578
Commit: 4d08653f72ca0a6bf3313ec96be3df1c16fb4ddc
Parents: 264f518
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jul 31 11:02:41 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jul 31 11:31:23 2017 +0300

----------------------------------------------------------------------
 .../GridDhtPartitionsExchangeFuture.java        | 28 ++++++++++++++------
 1 file changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4d08653f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 495f8b4..e7c2be4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -479,6 +479,21 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
     }
 
     /**
+     * @param newCrd {@code True} if node become coordinator on this exchange.
+     * @throws IgniteCheckedException If failed.
+     */
+    private void initCoordinatorCaches(boolean newCrd) throws IgniteCheckedException {
+        if (newCrd) {
+            IgniteInternalFuture<?> fut = cctx.affinity().initCoordinatorCaches(this,
false);
+
+            if (fut != null)
+                fut.get();
+
+            cctx.exchange().coordinatorInitialized();
+        }
+    }
+
+    /**
      * Starts activity.
      *
      * @param newCrd {@code True} if node become coordinator on this exchange.
@@ -551,6 +566,8 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
                     exchange = onAffinityChangeRequest(crdNode);
                 }
+
+                initCoordinatorCaches(newCrd);
             }
             else {
                 if (discoEvt.type() == EVT_NODE_JOINED) {
@@ -565,14 +582,7 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
                         initCachesOnLocalJoin();
                 }
 
-                if (newCrd) {
-                    IgniteInternalFuture<?> fut = cctx.affinity().initCoordinatorCaches(this,
false);
-
-                    if (fut != null)
-                        fut.get();
-
-                    cctx.exchange().coordinatorInitialized();
-                }
+                initCoordinatorCaches(newCrd);
 
                 if (exchCtx.mergeExchanges()) {
                     if (localJoinExchange()) {
@@ -3281,6 +3291,8 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
 
         /**
          * @param crdId Coordinator node.
+         * @param resTopVer Result version.
+         * @param msg Result message.
          */
         FinishState(UUID crdId, AffinityTopologyVersion resTopVer, GridDhtPartitionsFullMessage
msg) {
             this.crdId = crdId;


Mime
View raw message