[
https://issues.apache.org/jira/browse/HADOOP-11295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253996#comment-14253996
]
Gera Shegalov commented on HADOOP-11295:
----------------------------------------
Thanks for reporting the issue, [~mingma]! The fix in Server.java is correct.
Some comments to {{testRPCServerShutdown}}:
- Use of the qualifier {{final}} is inconsistent. More variables (conf,
clientN) can be made final, or get rid of it.
- Variable {{addr}} is used only once, please inline it as a parameter of
{{getProxy}} for clarity
- Don't swallow {{InterruptedException}} around in the {{while}} loops around
sleep they can be legit. I think It's fine to to remove try/catch and have the
test fail.
- 1000 millis is a little excessive. Let us do 100
- Move the client interrupt/join logic into the finally block past server.stop.
Then you actually don't need to call client.interrupt because client calls
will exit on its own.
- Use client.join() without the timeout parameter, we are already protected by
the Test timeout from blocking indefinitely.
> 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.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)