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/f9cee604 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f9cee604 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f9cee604 Branch: refs/heads/4.x-cdh5.15 Commit: f9cee6043d96f146f7f36bab159570b084270490 Parents: 1cbd79d 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 22:50:43 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/f9cee604/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 9bf82fe..06f8f68 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 @@ -433,7 +433,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 { @@ -610,6 +610,9 @@ public class MutableIndexFailureIT extends BaseTest { } } } + if (TOGGLE_FAIL_WRITE_FOR_RETRY) { + FAIL_WRITE = !FAIL_WRITE; + } } } if (throwException) {