PHOENIX-4785 Unable to write to table if index is made active during retry 
(addendum for test)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f3a279f6
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f3a279f6
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f3a279f6

Branch: refs/heads/4.14-cdh5.14
Commit: f3a279f6f75b24e6687fef5989881ab0abda0846
Parents: 161fbf0
Author: Vincent Poon <vincentp...@apache.org>
Authored: Fri Oct 12 23:49:39 2018 +0100
Committer: Pedro Boado <pbo...@apache.org>
Committed: Wed Oct 17 20:45:01 2018 +0100

----------------------------------------------------------------------
 .../org/apache/phoenix/end2end/index/MutableIndexFailureIT.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f3a279f6/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 aac20ac..46a512f 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
@@ -423,7 +423,7 @@ public class MutableIndexFailureIT extends BaseTest {
 
     private void addRowsInTableDuringRetry(final String tableName)
             throws SQLException, InterruptedException, ExecutionException {
-        int threads=10;
+        int threads=9;
         boolean wasFailWrite = FailingRegionObserver.FAIL_WRITE;
         boolean wasToggleFailWriteForRetry = 
FailingRegionObserver.TOGGLE_FAIL_WRITE_FOR_RETRY;
         try {
@@ -601,6 +601,9 @@ public class MutableIndexFailureIT extends BaseTest {
                             }
                         }
                     }
+                    if (TOGGLE_FAIL_WRITE_FOR_RETRY) {
+                        FAIL_WRITE = !FAIL_WRITE;
+                    }
                 }
             }
             if (throwException) {

Reply via email to