Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 f5a2f6d76 -> 7c0741b71
PHOENIX-3869 Keep index failure policies the same for 4.x branches Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7c0741b7 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7c0741b7 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7c0741b7 Branch: refs/heads/4.x-HBase-0.98 Commit: 7c0741b717f231a3d9dde182a5a88005880bb2c8 Parents: f5a2f6d Author: James Taylor <jamestay...@apache.org> Authored: Mon May 22 17:50:44 2017 -0700 Committer: James Taylor <jamestay...@apache.org> Committed: Tue May 23 10:51:06 2017 -0700 ---------------------------------------------------------------------- .../phoenix/end2end/index/MutableIndexFailureIT.java | 14 +++++++------- .../apache/phoenix/query/QueryServicesOptions.java | 2 +- .../org/apache/phoenix/schema/MetaDataClient.java | 6 ------ 3 files changed, 8 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/7c0741b7/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java index d9dca1e..9b11c0a 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexFailureIT.java @@ -121,7 +121,7 @@ public class MutableIndexFailureIT extends BaseTest { this.fullIndexName = SchemaUtil.getTableName(schema, indexName); this.isNamespaceMapped = isNamespaceMapped; this.leaveIndexActiveOnFailure = ! (disableIndexOnWriteFailure == null ? QueryServicesOptions.DEFAULT_INDEX_FAILURE_DISABLE_INDEX : disableIndexOnWriteFailure); - this.rebuildIndexOnWriteFailure = Boolean.TRUE.equals(rebuildIndexOnWriteFailure); + this.rebuildIndexOnWriteFailure = ! Boolean.FALSE.equals(rebuildIndexOnWriteFailure); } @BeforeClass @@ -148,13 +148,13 @@ public class MutableIndexFailureIT extends BaseTest { { true, false, false, true, true }, { true, false, true, true, true }, { false, true, true, true, true }, - { false, true, false, true, true }, - { true, true, false, true, true }, - { true, true, true, true, true }, + { false, true, false, null, null }, + { true, true, false, true, null }, + { true, true, true, null, true }, - { false, false, false, null, true }, - { false, true, false, false, true }, - { false, false, false, false, null }, + { false, false, false, false, true }, + { false, true, false, false, null }, + { false, false, false, false, false }, } ); } http://git-wip-us.apache.org/repos/asf/phoenix/blob/7c0741b7/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java index b9c01f3..ef8d1ab 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/QueryServicesOptions.java @@ -167,7 +167,7 @@ public class QueryServicesOptions { public static final int DEFAULT_CLOCK_SKEW_INTERVAL = 2000; public static final boolean DEFAULT_INDEX_FAILURE_HANDLING_REBUILD = true; // auto rebuild on public static final boolean DEFAULT_INDEX_FAILURE_BLOCK_WRITE = false; - public static final boolean DEFAULT_INDEX_FAILURE_DISABLE_INDEX = false; + public static final boolean DEFAULT_INDEX_FAILURE_DISABLE_INDEX = true; public static final long DEFAULT_INDEX_FAILURE_HANDLING_REBUILD_INTERVAL = 60000; // 60 secs public static final long DEFAULT_INDEX_FAILURE_HANDLING_REBUILD_OVERLAP_TIME = 1; // 1 ms http://git-wip-us.apache.org/repos/asf/phoenix/blob/7c0741b7/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java index fcb647d..ed5cd3a 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java @@ -160,7 +160,6 @@ import org.apache.phoenix.expression.Expression; import org.apache.phoenix.expression.RowKeyColumnExpression; import org.apache.phoenix.hbase.index.covered.update.ColumnReference; import org.apache.phoenix.index.IndexMaintainer; -import org.apache.phoenix.index.PhoenixIndexFailurePolicy; import org.apache.phoenix.jdbc.PhoenixConnection; import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData; import org.apache.phoenix.jdbc.PhoenixStatement; @@ -1898,11 +1897,6 @@ public class MetaDataClient { if (tableType == PTableType.TABLE) { Boolean isAppendOnlySchemaProp = (Boolean) TableProperty.APPEND_ONLY_SCHEMA.getValue(tableProps); isAppendOnlySchema = isAppendOnlySchemaProp!=null ? isAppendOnlySchemaProp : false; - - // By default, do not rebuild indexes on write failure - if (tableProps.get(PhoenixIndexFailurePolicy.REBUILD_INDEX_ON_WRITE_FAILURE) == null) { - tableProps.put(PhoenixIndexFailurePolicy.REBUILD_INDEX_ON_WRITE_FAILURE, Boolean.FALSE); - } } // Can't set any of these on views or shared indexes on views