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/06/12 15:40:13 UTC

[39/50] [abbrv] incubator-ignite git commit: Partition reserve for partition scan query fixed

Partition reserve for partition scan query fixed


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

Branch: refs/heads/ignite-950
Commit: 2b63ff8cfac20da0c7ab2f2fe55c33019dd3e9c4
Parents: e188e18
Author: agura <ag...@gridgain.com>
Authored: Thu Jun 11 21:55:00 2015 +0300
Committer: agura <ag...@gridgain.com>
Committed: Thu Jun 11 21:55:00 2015 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/query/GridCacheQueryManager.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2b63ff8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
index 6e71ba7..1317d38 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryManager.java
@@ -791,8 +791,9 @@ public abstract class GridCacheQueryManager<K, V> extends GridCacheManagerAdapte
 
                         locPart = dht.topology().localPartition(part, topVer, false);
 
-                        if (locPart == null || (locPart.state() != OWNING && locPart.state() != RENTING) ||
-                            !locPart.reserve())
+                        // double check for owning state
+                        if (locPart == null || locPart.state() != OWNING || !locPart.reserve() ||
+                            locPart.state() != OWNING)
                             throw new GridDhtInvalidPartitionException(part, "Partition can't be reserved");
 
                         iter = new Iterator<K>() {