geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasonhu...@apache.org
Subject incubator-geode git commit: GEODE-966 HashIndex with Overflow region detection/conversion needs to occur sooner
Date Thu, 03 Mar 2016 23:21:54 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/develop 7e354942b -> 491414210


GEODE-966 HashIndex with Overflow region detection/conversion needs to occur sooner

Conversion of HashIndex to CompactRangeIndex due to overflow is determined before the create
task is created.  This prevents the index map from getting into a weird state.


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

Branch: refs/heads/develop
Commit: 4914142105e2ec478679efdc1737ab9972b30d1e
Parents: 7e35494
Author: Jason Huynh <huynhja@gmail.com>
Authored: Thu Feb 25 16:23:08 2016 -0800
Committer: Jason Huynh <huynhja@gmail.com>
Committed: Thu Mar 3 15:15:15 2016 -0800

----------------------------------------------------------------------
 .../gemfire/cache/query/internal/index/IndexManager.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/49141421/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
index 7a0b1a9..d21b50d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
@@ -302,6 +302,11 @@ public class IndexManager  {
 
       IndexCreationHelper helper = null;
       boolean isCompactOrHash = false;
+      //Hash index not supported for overflow but we "thought" we were so let's maintain
backwards compatibility
+      //and create a regular compact range index instead
+      if (indexType == IndexType.HASH && isOverFlowRegion()) {
+        indexType = IndexType.FUNCTIONAL;
+      }
       if (indexType != IndexType.PRIMARY_KEY) {
         helper = new FunctionalIndexCreationHelper(origFromClause,
             origIndexedExpression, projectionAttributes, imports, region.getCache(),
@@ -1615,11 +1620,6 @@ public class IndexManager  {
       if (this.prIndex != null) {
         stats = this.prIndex.getStatistics();
       }
-      //Hash index not supported for overflow but we "thought" we were so let's maintain
backwards compatibility
-      //and create a regular compact range index instead
-      if (indexType == IndexType.HASH && isOverFlowRegion()) {
-        indexType = IndexType.FUNCTIONAL;
-      }
       if (indexType == IndexType.PRIMARY_KEY) {
         index = new PrimaryKeyIndex(indexName, region, fromClause,indexedExpression,
              projectionAttributes, origFromClause,


Mime
View raw message