Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.2 e746c225e -> 0215115de


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/0215115d
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/0215115d
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/0215115d

Branch: refs/heads/4.x-HBase-1.2
Commit: 0215115de865fbfc6e894138b50efd93435ce9d5
Parents: e746c22
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:53:45 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/0215115d/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 11573a5..853647e 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
@@ -119,7 +119,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
@@ -146,13 +146,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/0215115d/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/0215115d/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

Reply via email to