ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: Perf - Fixing tests.
Date Tue, 17 Nov 2015 09:05:08 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-perftest-merge ede3e1b0f -> 9a2f8e852


Perf - Fixing tests.


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

Branch: refs/heads/ignite-perftest-merge
Commit: 9a2f8e852a8088177cd3c789fffb93b513ff1c31
Parents: ede3e1b
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Tue Nov 17 12:04:50 2015 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Tue Nov 17 12:04:50 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCachePartitionExchangeManager.java  | 18 +++++++++---------
 .../distributed/dht/GridDhtTxPrepareFuture.java   |  2 +-
 .../cache/transactions/IgniteTxLocalAdapter.java  | 18 ++++++++++++++++++
 .../ignite/internal/util/nio/GridNioServer.java   |  2 +-
 4 files changed, 29 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9a2f8e85/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 7f0b2d9..fa12353 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -867,16 +867,16 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
         IgniteProductVersion maxVer = cctx.localNode().version();
 
         if (err == null) {
-            assert !F.isEmpty(exchFut.discoveryEvent().topologyNodes()) : exchFut.discoveryEvent();
+            if (!F.isEmpty(exchFut.discoveryEvent().topologyNodes())) {
+                for (ClusterNode node : exchFut.discoveryEvent().topologyNodes()) {
+                    IgniteProductVersion ver = node.version();
 
-            for (ClusterNode node : exchFut.discoveryEvent().topologyNodes()) {
-                IgniteProductVersion ver = node.version();
+                    if (ver.compareTo(minVer) < 0)
+                        minVer = ver;
 
-                if (ver.compareTo(minVer) < 0)
-                    minVer = ver;
-
-                if (ver.compareTo(maxVer) > 0)
-                    maxVer = ver;
+                    if (ver.compareTo(maxVer) > 0)
+                        maxVer = ver;
+                }
             }
         }
 
@@ -1103,7 +1103,7 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
 
             int cnt = 0;
 
-            for (GridDhtPartitionsExchangeFuture fut : exchFuts) {
+            for (GridDhtPartitionsExchangeFuture fut : exchFuts.values()) {
                 U.warn(log, ">>> " + fut);
 
                 if (++cnt == 10)

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a2f8e85/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index b1e3f22..d62244c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -720,7 +720,7 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
             tx.activeCachesDeploymentEnabled());
 
         if (prepErr == null) {
-            if (tx.needReturnValue() || tx.nearOnOriginatingNode())
+            if (tx.needReturnValue() || tx.nearOnOriginatingNode() || tx.hasInterceptor())
                 addDhtValues(res);
 
             GridCacheVersion min = tx.minVersion();

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a2f8e85/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 7e4c909..c52f93d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -381,6 +381,24 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
     }
 
     /**
+     * @return {@code True} if transaction participates in a cache that has an interceptor
configured.
+     */
+    public boolean hasInterceptor() {
+        GridLongList activeCaches = activeCacheIds();
+
+        for (int i = 0; i < activeCaches.size(); i++) {
+            int cacheId = (int)activeCaches.get(i);
+
+            GridCacheContext<?, ?> cacheCtx = cctx.cacheContext(cacheId);
+
+            if (cacheCtx.config().getInterceptor() != null)
+                return true;
+        }
+
+        return false;
+    }
+
+    /**
      * @param needRetVal Need return value flag.
      */
     public void needReturnValue(boolean needRetVal) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/9a2f8e85/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index f1aa4a7..5bd08e7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -1383,7 +1383,7 @@ public class GridNioServer<T> {
 
                     long now = U.currentTimeMillis();
 
-                    if (now - lastIdleCheck > 5000) {
+                    if (now - lastIdleCheck > 2000) {
                         lastIdleCheck = now;
 
                         checkIdle(selector.keys());


Mime
View raw message