ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [38/50] [abbrv] incubator-ignite git commit: ignite-sql-tests - replicated projection
Date Wed, 18 Mar 2015 03:24:27 GMT
ignite-sql-tests - replicated projection


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

Branch: refs/heads/ignite-375
Commit: cfcb9a42f34dfd038be2451a7a5ed62e3753810e
Parents: df3e4f7
Author: S.Vladykin <svladykin@gridgain.com>
Authored: Tue Mar 17 03:34:14 2015 +0300
Committer: S.Vladykin <svladykin@gridgain.com>
Committed: Tue Mar 17 03:34:14 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/IgniteCacheProxy.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/cfcb9a42/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index db507d9..aaa63fd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -336,7 +336,13 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
      * @return Local node cluster group.
      */
     private ClusterGroup projection(boolean local) {
-        return local || ctx.isLocal() || ctx.isReplicated() ? ctx.kernalContext().grid().cluster().forLocal()
: null;
+        if (local || ctx.isLocal() || isReplicatedDataNode())
+            return ctx.kernalContext().grid().cluster().forLocal();
+
+        if (ctx.isReplicated())
+            return ctx.kernalContext().grid().cluster().forDataNodes(ctx.name()).forRandom();
+
+        return null;
     }
 
     /**


Mime
View raw message