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

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

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

    https://github.com/apache/tajo/pull/412#discussion_r26304922
  
    --- Diff: tajo-rpc/src/test/java/org/apache/tajo/rpc/TestAsyncRpc.java ---
    @@ -125,8 +125,11 @@ public void setUpRpcServer() throws Exception {
       public void setUpRpcClient() throws Exception {
         retries = 1;
     
    -    client = new AsyncRpcClient(DummyProtocol.class,
    -        RpcUtils.getConnectAddress(server.getListenAddress()), retries);
    +    RpcConnectionPool.RpcConnectionKey rpcConnectionKey =
    +          new RpcConnectionPool.RpcConnectionKey(
    +              RpcUtils.getConnectAddress(server.getListenAddress()),
    +              DummyProtocol.class, true);
    +    client = new AsyncRpcClient(rpcConnectionKey, retries);
    --- End diff --
    
    It needs to acquire connection on this code block, or it can be initialized 
later on each test functions.


> 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