You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ka...@apache.org on 2019/09/17 07:49:32 UTC

[phoenix] branch 4.x-HBase-1.4 updated: PHOENIX-5473 Index write failures during index rebuilds should not change index table state (addendum)

This is an automated email from the ASF dual-hosted git repository.

kadir pushed a commit to branch 4.x-HBase-1.4
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.4 by this push:
     new 90d657e  PHOENIX-5473 Index write failures during index rebuilds should not change index table state (addendum)
90d657e is described below

commit 90d657e36e4a67a1d3825c6f3506d6c223692174
Author: Kadir <ko...@salesforce.com>
AuthorDate: Mon Sep 16 14:00:57 2019 -0700

    PHOENIX-5473 Index write failures during index rebuilds should not change index table state (addendum)
---
 .../org/apache/phoenix/end2end/index/MutableIndexRebuilderIT.java     | 4 ++--
 .../apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java  | 3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexRebuilderIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexRebuilderIT.java
index 0373249..55582b5 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexRebuilderIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexRebuilderIT.java
@@ -76,7 +76,7 @@ public class MutableIndexRebuilderIT extends BaseUniqueNamesOwnClusterIT {
      */
     @Test
     public void testRebuildRetriesSuccessful() throws Throwable {
-        int numberOfRetries = 3;
+        int numberOfRetries = 5;
         Map<String, String> serverProps = Maps.newHashMapWithExpectedSize(10);
         serverProps.put(QueryServices.INDEX_FAILURE_HANDLING_REBUILD_ATTRIB, Boolean.TRUE.toString());
         serverProps.put(QueryServices.INDEX_FAILURE_HANDLING_REBUILD_INTERVAL_ATTRIB, Long.toString(REBUILD_INTERVAL));
@@ -158,7 +158,7 @@ public class MutableIndexRebuilderIT extends BaseUniqueNamesOwnClusterIT {
         @Override
         public void postBatchMutate(ObserverContext<RegionCoprocessorEnvironment> c, MiniBatchOperationInProgress<Mutation> miniBatchOp) throws IOException {
             attempts.incrementAndGet();
-            throw new TimeoutIOException("Simulating write failure on " + c.getEnvironment().getRegionInfo().getTable().getNameAsString());
+            throw new DoNotRetryIOException("Simulating write failure on " + c.getEnvironment().getRegionInfo().getTable().getNameAsString());
         }
     }
 }
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
index 02596a0..b9a0f11 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
@@ -247,9 +247,6 @@ public class UngroupedAggregateRegionObserver extends BaseScannerRegionObserver
         try {
             commitBatch(region, localRegionMutations, blockingMemstoreSize);
         } catch (IOException e) {
-            if (e instanceof DoNotRetryIOException) {
-                throw(e);
-            }
             handleIndexWriteException(localRegionMutations, e, new MutateCommand() {
                 @Override
                 public void doMutation() throws IOException {