From a317a0f89c3d3ea10814b176ca230d719a984d9b Mon Sep 17 00:00:00 2001 From: Mikhail Antonov Date: Thu, 17 Mar 2016 01:06:42 -0700 Subject: [PATCH] HBASE-15390 Unnecessary MetaCache evictions cause elevated number of requests to meta (ADDENDUM) --- .../hadoop/hbase/exceptions/ClientExceptionsUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java index f586dce07cc..cf2a16f6fce 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java @@ -93,7 +93,11 @@ public final class ClientExceptionsUtil { if (cur == re) { return cur; } - } else if (cur.getCause() != null) { + + // When we receive RemoteException which wraps IOException which has a cause as + // RemoteException we can get into infinite loop here; so if the cause of the exception + // is RemoteException, we shouldn't look further. + } else if (cur.getCause() != null && !(cur.getCause() instanceof RemoteException)) { cur = cur.getCause(); } else { return cur;