You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/01/16 10:07:04 UTC

incubator-ignite git commit: # ignite-53 fail query is there are no data nodes

Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-53 c927f689a -> ae4cbca32


# ignite-53 fail query is there are no data nodes


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

Branch: refs/heads/ignite-53
Commit: ae4cbca3286fcfe1c3fd91d1241d9b143cb29ef6
Parents: c927f68
Author: sboikov <sb...@gridgain.com>
Authored: Fri Jan 16 12:06:48 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Jan 16 12:06:48 2015 +0300

----------------------------------------------------------------------
 .../kernal/processors/cache/query/GridCacheQueryAdapter.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae4cbca3/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
index ab27191..65e5cd2 100644
--- a/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
+++ b/modules/core/src/main/java/org/gridgain/grid/kernal/processors/cache/query/GridCacheQueryAdapter.java
@@ -24,6 +24,7 @@ import org.apache.ignite.plugin.security.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.kernal.processors.cache.*;
+import org.gridgain.grid.util.future.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -419,6 +420,9 @@ public class GridCacheQueryAdapter<T> implements GridCacheQuery<T> {
 
         cctx.checkSecurity(GridSecurityPermission.CACHE_READ);
 
+        if (nodes.isEmpty())
+            return new GridCacheQueryErrorFuture<>(cctx.kernalContext(), new ClusterGroupEmptyException());
+
         if (log.isDebugEnabled())
             log.debug("Executing query [query=" + this + ", nodes=" + nodes + ']');