[ 
https://issues.apache.org/jira/browse/HADOOP-2870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12575473#action_12575473
 ] 

Raghu Angadi commented on HADOOP-2870:
--------------------------------------

One change: client.stop() could wait a long time if client is waiting for 
response from server. So this could block other things like creating a 
different proxy by another thread. We could move client.stop() outside 
synchronized in ClientCache.stopClient() after removing it from the cache.

> I wonder if the reference counting is better done by WeakReference?
I doubt it. I think requirement here is to close the connection as soon as ref 
count goes to zero. WeakRef is java gc dependent, thus the original test 
failure that triggered this Jira will still fail.

> Datanode.shutdown() and Namenode.stop() should close all rpc connections
> ------------------------------------------------------------------------
>
>                 Key: HADOOP-2870
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2870
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: ipc
>    Affects Versions: 0.16.0
>            Reporter: Hairong Kuang
>            Assignee: Hairong Kuang
>             Fix For: 0.17.0
>
>         Attachments: closeConnection.patch
>
>
> Currently this two cleanup methods do not close all existing rpc connections. 
> If a mini dfs cluster gets shutdown and then restarted as we do in 
> TestFileCreation, RPCs in second mini cluster reuse the unclosed connections 
> opened in the first run but there is no server running to serve the request. 
> So the client get stuck waiting for the response forever if client side 
> timeout gets removed as suggested by hadoop-2811.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to