Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.1 da5d33b08 -> a96fafcea
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/a96fafce Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/a96fafce Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/a96fafce Branch: refs/heads/4.x-HBase-1.1 Commit: a96fafceafff159d83c3424f4359aa6f177eee41 Parents: da5d33b 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:52:25 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/a96fafce/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 075f799..c86a7f1 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/a96fafce/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 5541dcf..35eda60 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 @@ -168,7 +168,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/a96fafce/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 1254d79..24f3848 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; @@ -1897,11 +1896,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