ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-901
Date Wed, 15 Jul 2015 12:41:09 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-901 6d6628a97 -> 0e8d2ccc9


# ignite-901


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

Branch: refs/heads/ignite-901
Commit: 0e8d2ccc9ee2f7d51fb115c784cc4a624403a979
Parents: 6d6628a
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Jul 15 15:41:02 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Jul 15 15:41:02 2015 +0300

----------------------------------------------------------------------
 .../processors/affinity/GridAffinityAssignmentCache.java | 11 +++++++++++
 .../processors/cache/GridCacheAffinityManager.java       |  8 ++++++--
 .../cache/distributed/dht/GridDhtCacheAdapter.java       |  2 ++
 3 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0e8d2ccc/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
index d5c2b1a..d40128c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/affinity/GridAffinityAssignmentCache.java
@@ -141,6 +141,17 @@ public class GridAffinityAssignmentCache {
     }
 
     /**
+     *
+     */
+    public void onReconnected() {
+        affCache.clear();
+
+        head.set(new GridAffinityAssignment(AffinityTopologyVersion.NONE));
+
+        stopErr = null;
+    }
+
+    /**
      * Calculates affinity cache for given topology version.
      *
      * @param topVer Topology version to calculate affinity cache for.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0e8d2ccc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
index 1d0610e..88e5e40 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
@@ -67,9 +67,13 @@ public class GridCacheAffinityManager extends GridCacheManagerAdapter {
             "Failed to wait for topology update, client disconnected.");
 
         aff.onKernalStop(err);
+    }
 
-        aff = new GridAffinityAssignmentCache(cctx, cctx.namex(), cctx.config().getAffinity(),
-            cctx.config().getAffinityMapper(), cctx.config().getBackups());
+    /**
+     *
+     */
+    public void onReconnected() {
+        aff.onReconnected();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0e8d2ccc/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index f70597d..22a5287 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -137,6 +137,8 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
     @Override public void onReconnected() {
         super.onReconnected();
 
+        ctx.affinity().onReconnected();
+
         top.onReconnected();
 
         if (preldr != null)


Mime
View raw message