deniskuzZ commented on code in PR #4566:
URL: https://github.com/apache/hive/pull/4566#discussion_r1418845605


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TransactionalRetryProxy.java:
##########
@@ -149,15 +164,23 @@ public Object invoke(Object proxy, Method method, 
Object[] args) throws Throwabl
           LOG.debug("Successfull method invocation within retry context: {}", 
callerId);
           return result;
         } catch (IllegalAccessException | InvocationTargetException | 
UndeclaredThrowableException e) {
-          if (e.getCause() instanceof MetaException) {
-            throw (MetaException) e.getCause();
+          if (e.getCause() instanceof TException) {
+            throw (TException) e.getCause();
           } else if (e.getCause() instanceof RuntimeException) {
             throw (RuntimeException) e.getCause();
           } else {
             throw new RuntimeException(e);
           }
-        } catch (Throwable e) {
-          throw new RuntimeException(e);
+        } catch (TException | DataAccessException e) {

Review Comment:
   should we extract to rethrowException(e) 



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to