geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vfor...@apache.org
Subject [22/50] [abbrv] incubator-geode git commit: [GEODE-157] Check for colocation not failing if non colocated comparison is first comparison made Fixed issue where if first region being checked happens to not be colocated, no longer ignores and throws the co
Date Wed, 25 Nov 2015 19:07:35 GMT
[GEODE-157] Check for colocation not failing if non colocated comparison is first comparison
made
Fixed issue where if first region being checked happens to not be colocated, no longer ignores
and
throws the correct exception


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

Branch: refs/heads/feature/GEODE-78
Commit: 4eed17baa585146e4d9b5d686cbfdb84296b2233
Parents: 9e4a94e
Author: Jason Huynh <jhuynh@pivotal.io>
Authored: Mon Oct 5 09:47:43 2015 -0700
Committer: Jason Huynh <jhuynh@pivotal.io>
Committed: Mon Oct 5 09:47:43 2015 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/cache/query/internal/DefaultQuery.java | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4eed17ba/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
index 3c87d7e..86a02a8 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
@@ -628,7 +628,7 @@ public class DefaultQuery implements Query {
       }
 
       // If there are more than one  PRs they have to be co-located.
-      QueryExecutor root = null;
+      QueryExecutor other = null;
       for (QueryExecutor eachPR : prs) {
         boolean colocated = false;
         
@@ -636,7 +636,7 @@ public class DefaultQuery implements Query {
           if (eachPR == allPRs) {
             continue;
           }
-
+          other = allPRs;
           if ((((PartitionedRegion) eachPR).colocatedByList.contains(allPRs) || 
               ((PartitionedRegion) allPRs).colocatedByList.contains(eachPR)))  {
             colocated = true;
@@ -644,13 +644,12 @@ public class DefaultQuery implements Query {
           } 
         } // allPrs
 
-        if (!colocated && root != null) {
+        if (!colocated) { 
           throw new UnsupportedOperationException(
               LocalizedStrings.DefaultQuery_A_QUERY_ON_A_PARTITIONED_REGION_0_MAY_NOT_REFERENCE_ANY_OTHER_NON_COLOCATED_PARTITIONED_REGION_1
               .toLocalizedString(new Object[] { eachPR.getName(),
-                  root.getName() }));
+                  other.getName() }));
         }
-        root = eachPR;
         
       } // eachPR
 


Mime
View raw message