You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/01/21 01:08:08 UTC
[GitHub] [iceberg] rdblue commented on a change in pull request #2119: Hive: Fix connection pool fails to connect to the Hive Metastore #1994
rdblue commented on a change in pull request #2119:
URL: https://github.com/apache/iceberg/pull/2119#discussion_r561447854
##########
File path: hive-metastore/src/main/java/org/apache/iceberg/hive/HiveClientPool.java
##########
@@ -83,6 +83,20 @@ protected HiveMetaStoreClient reconnect(HiveMetaStoreClient client) {
return client;
}
+ @Override
+ protected boolean failureDetection(HiveMetaStoreClient client, Exception ex) {
Review comment:
I might not understand the fix. From reading #1994, I thought the problem was that some client calls throw the wrong exception, a `MetaException` that wraps `TTransportException` instead of `TTransportException`. That causes the reconnect detection to fail and the `MetaException` is thrown instead.
I would then expect the fix to be to detect the `MetaException` that wraps `TTransportException` and return true because the connection should be reconnected.
The implementation here appears to be to try to use the connection again and return true if it fails with `TTransportException` the second time or false (do not reconnect) if it succeeds. But why issue the second call instead of detecting the failure case using `ex.getCause()`?
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org