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

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

GitHub user navis opened a pull request:

    https://github.com/apache/tajo/pull/420

    TAJO-1399 TajoResourceAllocator might hang on network error

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/navis/tajo TAJO-1399

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/420.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #420
    
----
commit 65c5c4e5ca079bddc238b0eeacae34726f696957
Author: navis.ryu <[email protected]>
Date:   2015-03-13T04:47:27Z

    TAJO-1399 TajoResourceAllocator might hang on network error

----


> TajoResourceAllocator might hang on network error
> -------------------------------------------------
>
>                 Key: TAJO-1399
>                 URL: https://issues.apache.org/jira/browse/TAJO-1399
>             Project: Tajo
>          Issue Type: Bug
>          Components: rpc
>            Reporter: Navis
>            Assignee: Navis
>
> {code}
> CallFuture<WorkerResourceAllocationResponse> callBack = new 
> CallFuture<WorkerResourceAllocationResponse>();
> ...
> RpcConnectionPool connPool = RpcConnectionPool.getPool();
> NettyClientBase tmClient = null;
> try {
>   ServiceTracker serviceTracker = 
> queryTaskContext.getQueryMasterContext().getWorkerContext().getServiceTracker();
>   tmClient = connPool.getConnection(serviceTracker.getUmbilicalAddress(), 
> QueryCoordinatorProtocol.class, true);
>   QueryCoordinatorProtocolService masterClientService = tmClient.getStub();
>   masterClientService.allocateWorkerResources(null, request, callBack);
> } catch (Throwable e) {
>   LOG.error(e.getMessage(), e);
> } finally {
>   connPool.releaseConnection(tmClient);
> }
> WorkerResourceAllocationResponse response = null;
> while(!stopped.get()) {
>   try {
>     response = callBack.get(3, TimeUnit.SECONDS);
>     ...
> {code}
> If "callBack" is not registered properly in netty by failed connection, etc., 
> allocator thread would block on empty future forever, possibly making thread 
> leakage.



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

Reply via email to