[ 
https://issues.apache.org/jira/browse/HADOOP-18324?focusedWorklogId=787249&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-787249
 ]

ASF GitHub Bot logged work on HADOOP-18324:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Jul/22 23:37
            Start Date: 01/Jul/22 23:37
    Worklog Time Spent: 10m 
      Work Description: omalley opened a new pull request, #4527:
URL: https://github.com/apache/hadoop/pull/4527

   ### Description of PR
   
   I modified the RPC Connection class to use a single thread that does the 
writes to the socket instead of a thread factory. (It already has a different 
thread that does the reads.) Java’s concurrency library has a SynchronousQueue 
that will simplify hand offs from the calling thread to the rpc sending thread.
   
   As a result, we’ll end up with:
   * Exactly 1 sending thread per an RPC connection.
   * If the calling thread is interrupted before the socket write, it will be 
skipped instead of sending it anyways.
   * If the calling thread is interrupted during the socket write, the write 
will finish.
   * RPC requests will be written to the socket in the order received.
   
   ### How was this patch tested?
   
   Added a unit test.
   
   
   




Issue Time Tracking
-------------------

            Worklog Id:     (was: 787249)
    Remaining Estimate: 0h
            Time Spent: 10m

> Interrupting RPC Client calls can lead to thread exhaustion
> -----------------------------------------------------------
>
>                 Key: HADOOP-18324
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18324
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: ipc
>    Affects Versions: 3.4.0, 2.10.2, 3.3.3
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>            Priority: Critical
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently the IPC client creates a boundless number of threads to write the 
> rpc request to the socket. The NameNode uses timeouts on its RPC calls to the 
> Journal Node and a stuck JN will cause the NN to create an infinite set of 
> threads.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to