From 967076646d7e061b69b822aa25892389e1e803f8 Mon Sep 17 00:00:00 2001 From: Mikhail Antonov Date: Fri, 4 Nov 2016 17:30:17 -0700 Subject: [PATCH] HBASE-17032 CallQueueTooBigException and CallDroppedException should not be triggering PFFE --- .../apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java | 4 +--- .../src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java index fed87c1..7ac5c45 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/PreemptiveFastFailInterceptor.java @@ -174,9 +174,7 @@ class PreemptiveFastFailInterceptor extends RetryingCallerInterceptor { Throwable t2 = ClientExceptionsUtil.translatePFFE(t1); boolean isLocalException = !(t2 instanceof RemoteException); - if ((isLocalException && ClientExceptionsUtil.isConnectionException(t2)) || - ClientExceptionsUtil.isCallQueueTooBigException(t2) || - ClientExceptionsUtil.isCallDroppedException(t2)) { + if ((isLocalException && ClientExceptionsUtil.isConnectionException(t2))) { couldNotCommunicateWithServer.setValue(true); guaranteedClientSideOnly.setValue(!(t2 instanceof CallTimeoutException)); handleFailureToServer(serverName, t2); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java index bd3fab1..2aeed1e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFastFail.java @@ -306,7 +306,7 @@ public class TestFastFail { } @Test - public void testCallQueueTooBigException() throws Exception { + public void testCallQueueTooBigExceptionDoesntTriggerPffe() throws Exception { Admin admin = TEST_UTIL.getHBaseAdmin(); final String tableName = "testCallQueueTooBigException"; @@ -340,7 +340,8 @@ public class TestFastFail { } catch (Throwable ex) { } - assertEquals("There should have been 1 hit", 1, + assertEquals("We should have not entered PFFE mode on CQTBE, but we did;" + + " number of times this mode should have been entered:", 0, CallQueueTooBigPffeInterceptor.numCallQueueTooBig.get()); newConf = HBaseConfiguration.create(TEST_UTIL.getConfiguration()); -- 2.8.0-rc2