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

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

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

    https://github.com/apache/tajo/pull/480#discussion_r27837678
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/master/rm/TajoWorkerResourceManager.java
 ---
    @@ -221,11 +231,16 @@ public WorkerAllocatedResource 
allocateQueryMaster(QueryInProgress queryInProgre
         try {
           response = callFuture.get(3, TimeUnit.SECONDS);
         } catch (Throwable t) {
    -      LOG.error(t, t);
    -      return null;
    +      response = callFuture.cancel(); // try cancel
    +      if (response == null) {
    +        // canceled future
    +        LOG.warn("Got exception " + t);
    +        LOG.error(t, t);
    --- End diff --
    
    This (response != null in catch block) means response is acquired after 
timeout. I don't think it should be logged even if we got expected result in 
time.


> allocateQueryMaster can leak resources if it times-out (3sec, hardcoded)
> ------------------------------------------------------------------------
>
>                 Key: TAJO-1469
>                 URL: https://issues.apache.org/jira/browse/TAJO-1469
>             Project: Tajo
>          Issue Type: Bug
>            Reporter: Navis
>            Assignee: Navis
>
> {code}
>     WorkerResourceAllocationResponse response = null;
>     try {
>       response = callFuture.get(3, TimeUnit.SECONDS);
>     } catch (Throwable t) {
>       LOG.error(t, t);
>       return null;
>     }
> {code}
> If it times-out (or interrupted), allocated resources cannot be retrieved 
> forever.



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

Reply via email to