[
https://issues.apache.org/jira/browse/TAJO-1469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14481155#comment-14481155
]
ASF GitHub Bot commented on TAJO-1469:
--------------------------------------
Github user babokim commented on a diff in the pull request:
https://github.com/apache/tajo/pull/480#discussion_r27793934
--- 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 --
I think this line is not necessary if you change as the following in the
immediately preceding line.
```
LOG.warn("Got exception while allocating QueryMaster: " + t, t);
```
> 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)