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-23
Date Tue, 26 May 2015 11:13:40 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-23 639ee0249 -> 6432ec0e9


# ignite-23


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

Branch: refs/heads/ignite-23
Commit: 6432ec0e9560101679b0d1b78e1966fd9faa72d2
Parents: 639ee02
Author: sboikov <sboikov@gridgain.com>
Authored: Tue May 26 13:48:38 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue May 26 13:56:40 2015 +0300

----------------------------------------------------------------------
 .../managers/discovery/GridDiscoveryManager.java  |  2 ++
 .../distributed/dht/GridDhtCacheAdapter.java      | 18 ++----------------
 .../dht/GridDhtTransactionalCacheAdapter.java     |  4 ++--
 .../dht/atomic/GridDhtAtomicCache.java            |  2 +-
 .../cache/transactions/IgniteTxHandler.java       |  9 ++-------
 .../cache/GridCacheAbstractFailoverSelfTest.java  |  2 +-
 6 files changed, 10 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6432ec0e/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index f0e3551..9619c1c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -2132,6 +2132,8 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
 
             all.addAll(rmtNodes);
 
+            Collections.sort(all, GridNodeOrderComparator.INSTANCE);
+
             allNodes = Collections.unmodifiableList(all);
 
             Map<String, Collection<ClusterNode>> cacheMap = new HashMap<>(allNodes.size(),
1.0f);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6432ec0e/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 3693422..adea9e0 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
@@ -934,30 +934,16 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
     /**
      * @param expVer Expected topology version.
      * @param curVer Current topology version.
-     * @param keys Keys.
      * @return {@code True} if cache affinity changed and operation should be remapped.
      */
-    protected final boolean needRemap(AffinityTopologyVersion expVer,
-        AffinityTopologyVersion curVer,
-        Collection<?> keys)
-    {
+    protected final boolean needRemap(AffinityTopologyVersion expVer, AffinityTopologyVersion
curVer) {
         if (expVer.equals(curVer))
             return false;
 
         Collection<ClusterNode> cacheNodes0 = ctx.discovery().cacheAffinityNodes(ctx.name(),
expVer);
         Collection<ClusterNode> cacheNodes1 = ctx.discovery().cacheAffinityNodes(ctx.name(),
curVer);
 
-        if (!cacheNodes0.equals(cacheNodes1)) {
-            for (Object key : keys) {
-                Collection<ClusterNode> keyNodes0 = ctx.affinity().nodes(key, expVer);
-                Collection<ClusterNode> keyNodes1 = ctx.affinity().nodes(key, curVer);
-
-                if (!keyNodes0.equals(keyNodes1))
-                    return true;
-            }
-        }
-
-        return false;
+        return !cacheNodes0.equals(cacheNodes1);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6432ec0e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
index 3c6ab7b..703daf9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTransactionalCacheAdapter.java
@@ -731,7 +731,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
                             }
 
                             try {
-                                if (top != null && needRemap(req.topologyVersion(),
top.topologyVersion(), req.keys())) {
+                                if (top != null && needRemap(req.topologyVersion(),
top.topologyVersion())) {
                                     if (log.isDebugEnabled()) {
                                         log.debug("Client topology version mismatch, need
remap lock request [" +
                                             "reqTopVer=" + req.topologyVersion() +
@@ -828,7 +828,7 @@ public abstract class GridDhtTransactionalCacheAdapter<K, V> extends
GridDhtCach
                                 }
 
                                 try {
-                                    if (top != null && needRemap(req.topologyVersion(),
top.topologyVersion(), req.keys())) {
+                                    if (top != null && needRemap(req.topologyVersion(),
top.topologyVersion())) {
                                         if (log.isDebugEnabled()) {
                                             log.debug("Client topology version mismatch,
need remap lock request [" +
                                                 "reqTopVer=" + req.topologyVersion() +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6432ec0e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 8da2772..9135f0a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1047,7 +1047,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                     // Also do not check topology version if topology was locked on near
node by
                     // external transaction or explicit lock.
                     if ((req.fastMap() && !req.clientRequest()) || req.topologyLocked()
||
-                        !needRemap(req.topologyVersion(), topology().topologyVersion(), req.keys()))
{
+                        !needRemap(req.topologyVersion(), topology().topologyVersion()))
{
                         ClusterNode node = ctx.discovery().node(nodeId);
 
                         if (node == null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6432ec0e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index c5d5240..30fabe9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@ -421,13 +421,8 @@ public class IgniteTxHandler {
             Collection<ClusterNode> cacheNodes0 = ctx.discovery().cacheAffinityNodes(ctx.name(),
expVer);
             Collection<ClusterNode> cacheNodes1 = ctx.discovery().cacheAffinityNodes(ctx.name(),
curVer);
 
-            if (!cacheNodes0.equals(cacheNodes1)) {
-                Collection<ClusterNode> keyNodes0 = ctx.affinity().nodes(e.key(), expVer);
-                Collection<ClusterNode> keyNodes1 = ctx.affinity().nodes(e.key(), curVer);
-
-                if (!keyNodes0.equals(keyNodes1))
-                    return true;
-            }
+            if (!cacheNodes0.equals(cacheNodes1))
+                return true;
         }
 
         return false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6432ec0e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
index 5d9ad35..6b7d1b8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFailoverSelfTest.java
@@ -74,7 +74,7 @@ public abstract class GridCacheAbstractFailoverSelfTest extends GridCacheAbstrac
 
         discoSpi.setSocketTimeout(10_000);
         discoSpi.setAckTimeout(10_000);
-        discoSpi.setNetworkTimeout(10_000);
+        discoSpi.setNetworkTimeout(60_000);
 
         return cfg;
     }


Mime
View raw message