[
https://issues.apache.org/jira/browse/IMPALA-14788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18061507#comment-18061507
]
ASF subversion and git services commented on IMPALA-14788:
----------------------------------------------------------
Commit d410fc253db1a6773bf7682d26803f0894c5d717 in impala's branch
refs/heads/master from Michael Smith
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=d410fc253 ]
IMPALA-14788: Prevent Thread interrupt after completion
When cancelling a thread, uses computeIfPresent to prevent interrupting
the thread after the thread has finished all its work, which would leave
the thread in an interrupted state if it's re-used later. Ensures the
Thread's interrupted status is cleared after cancellable work is done.
Moves logging after that work to avoid logging while holding a lock.
Change-Id: I54af34d253511f18f59b5cd43f1cf57a26a772eb
Reviewed-on: http://gerrit.cloudera.org:8080/24044
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Cancelling query could potentially poison Thread reuse
> ------------------------------------------------------
>
> Key: IMPALA-14788
> URL: https://issues.apache.org/jira/browse/IMPALA-14788
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Affects Versions: Impala 5.0.0
> Reporter: Michael Smith
> Assignee: Michael Smith
> Priority: Major
>
> Query cancellation in IMPALA-915 has a potential race condition in Canceller:
> # {{cancel(id) -> queryThreads_.get(id)}}
> # {{close() -> queryThreads_.remove(id) -> <return>}}
> # {{queryThread.interrupt()}}
> This would leave the queryThread in an interrupted state, and if it's re-used
> would cause a later operation to be interrupted.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]