You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/03/04 18:30:22 UTC
[10/14] incubator-geode git commit: GEODE-966 HashIndex with Overflow
region detection/conversion needs to occur sooner
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/feature/GEODE-949-2
Commit: 4914142105e2ec478679efdc1737ab9972b30d1e
Parents: 7e35494
Author: Jason Huynh <hu...@gmail.com>
Authored: Thu Feb 25 16:23:08 2016 -0800
Committer: Jason Huynh <hu...@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,