You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ra...@apache.org on 2016/06/17 15:50:52 UTC

phoenix git commit: PHOENIX-1734 TxWriteFailureIT taking 16min around. Addendum to fix it.

Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 46c262fe8 -> 365133c18


PHOENIX-1734 TxWriteFailureIT taking 16min around. Addendum to fix it.


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 365133c183f17360350a26fd061ee4dc09768760
Parents: 46c262f
Author: Rajeshbabu Chintaguntla <ra...@apache.org>
Authored: Fri Jun 17 21:27:06 2016 +0530
Committer: Rajeshbabu Chintaguntla <ra...@apache.org>
Committed: Fri Jun 17 21:27:06 2016 +0530

----------------------------------------------------------------------
 .../phoenix/index/PhoenixTransactionalIndexer.java  | 16 ++++++++++++++--
 .../java/org/apache/phoenix/util/ServerUtil.java    |  2 +-
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/365133c1/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
index c50cb94..331d00b 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/index/PhoenixTransactionalIndexer.java
@@ -206,7 +206,13 @@ public class PhoenixTransactionalIndexer extends BaseRegionObserver {
             super.prePut(e, put, edit, durability);
         } else {
             Collection<Pair<Mutation, byte[]>> localIndexUpdates = localUpdates.remove(Bytes.toLong(bs));
-            this.writer.write(localIndexUpdates, true);
+            try{
+                this.writer.write(localIndexUpdates, true);
+            } catch (Throwable t) {
+                String msg = "Failed to update index with entries:" + localIndexUpdates;
+                LOG.error(msg, t);
+                ServerUtil.throwIOException(msg, t);
+            }
         }
     }
 
@@ -220,7 +226,13 @@ public class PhoenixTransactionalIndexer extends BaseRegionObserver {
             super.postDelete(e, delete, edit, durability);
         } else {
             Collection<Pair<Mutation, byte[]>> localIndexUpdates = localUpdates.remove(Bytes.toLong(bs));
-            this.writer.write(localIndexUpdates, true);
+            try{
+                this.writer.write(localIndexUpdates, true);
+            } catch (Throwable t) {
+                String msg = "Failed to update index with entries:" + localIndexUpdates;
+                LOG.error(msg, t);
+                ServerUtil.throwIOException(msg, t);
+            }
         }
     }
 

http://git-wip-us.apache.org/repos/asf/phoenix/blob/365133c1/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
index 679c7a1..ea0ebea 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
@@ -67,7 +67,7 @@ public class ServerUtil {
         } else if (t instanceof IOException) {
             // If the IOException does not wrap any exception, then bubble it up.
             Throwable cause = t.getCause();
-            if (cause instanceof RetriesExhaustedWithDetailsException)
+            if (cause instanceof RetriesExhaustedWithDetailsException || cause instanceof DoNotRetryIOException)
             	return new DoNotRetryIOException(t.getMessage(), cause);
             else if (cause == null || cause instanceof IOException) {
                 return (IOException) t;