You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lens.apache.org by "Rajat Khandelwal (JIRA)" <ji...@apache.org> on 2016/10/05 07:26:20 UTC

[jira] [Commented] (LENS-1345) Deadlock in jdbc query status update

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

Rajat Khandelwal commented on LENS-1345:
----------------------------------------

The solution is to not fetch the driver result set in the constructor of FinishedQuery, rather fetch it when it's required, which happens in QueryPurger -- a different thread, so the original thread isn't blocked. 



> Deadlock in jdbc query status update
> ------------------------------------
>
>                 Key: LENS-1345
>                 URL: https://issues.apache.org/jira/browse/LENS-1345
>             Project: Apache Lens
>          Issue Type: Bug
>            Reporter: Rajat Khandelwal
>            Assignee: Rajat Khandelwal
>
> JDBC query is launched in a thread. On query finish, the thread calls back the query service to update status, which creates a FinishedQuery instance. In the constructor, FinishedQuery is fetching result from the jdbc driver, which waits on the original thread to complete. Basically the thread is waiting for itself. 
> In the callback, query context is acquired by the thread, and can't be acquired again. Which means that get calls for this query won't return and will stay blocked. This can end up blocking all the grizzly threads. 



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