You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ming Ma (JIRA)" <ji...@apache.org> on 2015/01/05 21:28:34 UTC

[jira] [Commented] (HADOOP-11295) RPC Server Reader thread can't shutdown if RPCCallQueue is full

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

Ming Ma commented on HADOOP-11295:
----------------------------------

Thanks, [~jira.shegalov]! Good idea to use ExecutorService. One minor thing, in the check if all client calls have been received  by the RPC server as in {{server.getCallQueueLen() != 1 && countThreads(CallQueueManager.class.getName()) != 1}}, it will be useful to add another check to make sure the handler thread is blocked, something like {{countThreads(TestProtocol.class.getName()) != 1}}. This will cover the case where handler thread is slow to start up and thus the test code leaves the while loop a bit early. Otherwise, it looks good.

> RPC Server Reader thread can't shutdown if RPCCallQueue is full
> ---------------------------------------------------------------
>
>                 Key: HADOOP-11295
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11295
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Ming Ma
>            Assignee: Ming Ma
>         Attachments: HADOOP-11295-2.patch, HADOOP-11295-3.patch, HADOOP-11295-4.patch, HADOOP-11295-5.patch, HADOOP-11295.patch
>
>
> If RPC server is asked to stop when RPCCallQueue is full, {{reader.join()}} will just wait there. That is because
> 1. The reader thread is blocked on {{callQueue.put(call);}}.
> 2. When RPC server is asked to stop, it will interrupt all handler threads and thus no threads will drain the callQueue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)