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

ASF GitHub Bot commented on TAJO-1391:
--------------------------------------

Github user navis commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/412#discussion_r26354442
  
    --- Diff: tajo-rpc/src/main/java/org/apache/tajo/rpc/AsyncRpcClient.java ---
    @@ -113,16 +87,11 @@ public void close() {
       }
     
       private class ProxyRpcChannel implements RpcChannel {
    -    private final ClientChannelInboundHandler handler;
    -
    -    public ProxyRpcChannel() {
    -      this.handler = getChannel().pipeline()
    -          .get(ClientChannelInboundHandler.class);
    +    private ClientChannelInboundHandler handler;
     
    -      if (handler == null) {
    -        throw new IllegalArgumentException("Channel does not have " +
    -            "proper handler");
    -      }
    +    private ClientChannelInboundHandler handler() {
    +      return handler == null ? handler = getChannel().pipeline()
    --- End diff --
    
    The code part cannot be reached if this connection is not acquired, 
asserting the channel is established already. And callMethod() is already 
regarding getChannel() returns not-null value. I'll add RuntimeException on 
getChannel() if it can be null.


> RpcConnectionPool should check reference counter of connection before close
> ---------------------------------------------------------------------------
>
>                 Key: TAJO-1391
>                 URL: https://issues.apache.org/jira/browse/TAJO-1391
>             Project: Tajo
>          Issue Type: Improvement
>          Components: rpc
>            Reporter: Navis
>            Assignee: Navis
>
> Connections in the pool is shared one and should be closed only when it's not 
> referenced by other threads. Furthermore, current pool implementation locks 
> whole connections for connecting/closing a connection, making bad 
> interferences on other operations (on sane connection).



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

Reply via email to