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()`?
##########
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:
@pvary, what do you think?
##########
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:
Hm. What is the exception message when the connection is to blame? I
don't like that solution either, but it seems better than making a second RPC
call if we have something that is reliable there.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]