[
https://issues.apache.org/jira/browse/HADOOP-12464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14946937#comment-14946937
]
Kihwal Lee commented on HADOOP-12464:
-------------------------------------
If an interrupt is noticed while sending the request, {{Client#call()}} catches
{{InterruptedException}}, wrap it in {{IOException}} and throw. Since
{{RetryPolicies#FailoverOnNetworkExceptionRetry}} regards all {{IOException}}s
as local exception, it prescribes {{RetryAction.FAILOVER_AND_RETRY}}. We can
make the client bail out early in {{RetryInvocationHandler}} before it even
consults {{RetryPolicies}}.
Another potential place of hang is after making the call. In {{Client#call()}},
when waiting for a response, it catches {{InterruptedException}} to sets a
local variable and continues to wait for a response. The connection thread has
to either get a response or get shutdown and notify the client for it to exit
the loop. It allows graceful termination, but may cause extra delay or hang
during shutdown. I am not sure what is the harm in throwing right away when an
{{InterruptedException}} is received.
> Interrupted client may try to fail-over and retry
> -------------------------------------------------
>
> Key: HADOOP-12464
> URL: https://issues.apache.org/jira/browse/HADOOP-12464
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Kihwal Lee
>
> When an IPC client is interrupted, it sometimes try to fail-over to a
> different namenode and retry. We've seen this causing hang during shutdown.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)