Merge branch 'ignite-921' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-389
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/5a7dd02f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/5a7dd02f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/5a7dd02f Branch: refs/heads/ignite-929 Commit: 5a7dd02f540c98312bc120c2566ba0db94f7a570 Parents: 9bb71ba b58bb12 Author: Alexey Goncharuk <agoncha...@gridgain.com> Authored: Wed May 27 09:40:17 2015 -0700 Committer: Alexey Goncharuk <agoncha...@gridgain.com> Committed: Wed May 27 09:40:17 2015 -0700 ---------------------------------------------------------------------- dev-tools/slurp.sh | 10 + dev-tools/src/main/groovy/jiraslurp.groovy | 9 +- .../cache/query/GridCacheQueryAdapter.java | 200 ++++++++++++++++- ...CacheScanPartitionQueryFallbackSelfTest.java | 213 +++++++++++++++++++ .../IgniteCacheQuerySelfTestSuite.java | 2 + 5 files changed, 429 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5a7dd02f/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java ---------------------------------------------------------------------- diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java index 9ab8c4f,05198a4..1f7b736 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryAdapter.java @@@ -487,14 -508,13 +508,16 @@@ public class GridCacheQueryAdapter<T> i @Nullable final ClusterGroup prj, @Nullable final Integer part) { assert cctx != null; + final List<ClusterNode> owners = part == null ? null : + cctx.topology().owners(part, cctx.affinity().affinityTopologyVersion()); + return F.view(CU.allNodes(cctx), new P1<ClusterNode>() { @Override public boolean apply(ClusterNode n) { + AffinityTopologyVersion topVer = cctx.affinity().affinityTopologyVersion(); + return cctx.discovery().cacheAffinityNode(n, cctx.name()) && (prj == null || prj.node(n.id()) != null) && - (part == null || cctx.affinity().primary(n, part.intValue(), topVer)); + (part == null || owners.contains(n)); } }); }