You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/09/14 16:40:10 UTC

[GitHub] [hbase] saintstack commented on a change in pull request #578: HBASE-22699 refactor isMetaClearingException

saintstack commented on a change in pull request #578: HBASE-22699 refactor isMetaClearingException
URL: https://github.com/apache/hbase/pull/578#discussion_r324429898
 
 

 ##########
 File path: hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java
 ##########
 @@ -59,18 +58,28 @@ public static boolean isMetaClearingException(Throwable cur) {
     if (cur == null) {
       return true;
     }
-    return !isSpecialException(cur) || (cur instanceof RegionMovedException)
-        || cur instanceof NotServingRegionException;
+    return !isMetaCachePreservingException(cur);
   }
 
-  public static boolean isSpecialException(Throwable cur) {
-    return (cur instanceof RegionMovedException || cur instanceof RegionOpeningException
-        || cur instanceof RegionTooBusyException || cur instanceof RpcThrottlingException
-        || cur instanceof MultiActionResultTooLarge || cur instanceof RetryImmediatelyException
-        || cur instanceof CallQueueTooBigException || cur instanceof CallDroppedException
-        || cur instanceof NotServingRegionException || cur instanceof RequestTooBigException);
+  public static boolean isRegionServerOverloadedException(Throwable t) {
+    t = findException(t);
+    return isInstanceOfRegionServerOverloadedException(t);
+  }
+
+  private static boolean isInstanceOfRegionServerOverloadedException(Throwable t) {
+    return t instanceof CallQueueTooBigException || t instanceof CallDroppedException;
   }
 
+  private static boolean isMetaCachePreservingException(Throwable t) {
+    return t instanceof RegionOpeningException || t instanceof RegionTooBusyException
+        || t instanceof RpcThrottlingException || t instanceof RetryImmediatelyException
+        || t instanceof RequestTooBigException;
 
 Review comment:
   So, this list here is smaller than the list above in the old isSpecialException. I looked at one or two of the differences. It seems like superclasses are listed here and you drop the mention of subclasses. Is that the case? Just a little worried we're not catching something here that we used to.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services