ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [39/50] [abbrv] incubator-ignite git commit: Partition reserve for partition scan query fixed
Date Fri, 12 Jun 2015 13:40:13 GMT
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 <agura@gridgain.com>
Authored: Thu Jun 11 21:55:00 2015 +0300
Committer: agura <agura@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>() {


Mime
View raw message