drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3640) Drill JDBC driver support Statement.setQueryTimeout(int)
Date Fri, 30 Jun 2017 20:35:00 GMT

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

ASF GitHub Bot commented on DRILL-3640:
---------------------------------------

Github user kkhatua commented on the issue:

    https://github.com/apache/drill/pull/858
  
    Wouldn't a query cancellation automatically interrupt those potentially blocking operations?
I'm simply looking up whether the trigger was a timeout DrillStatement.isTimedOut() to decide
if the returning exception is a SqlTimeoutExcp.
    
    The extra thread (though mostly sleeping) didn't seem like a huge cost considering that
the timeout is at the granularity of seconds.
    
    I ran a small custom JDBC client application to test this theory. Running longevity and
concurrency testing worked well when testing for timeouts. For timeouts as low as 1 second
for queries that needed to do lot of back end processing before returning rows much later
(like a massive join), I noticed that we caught underlying exceptions as the timeouts during
the 'executeQuery' call itself. If I were to not go the route of issuing a Statement.cancel()
but relying primarily on the DrillCursor, unless I put in some mechanism of constantly polling
for the out-of-time state of the clock. I think then I also need to cancel then cancel all
operations from the level of the DrillCursor in both directions (up to the Statement and down
to the fragments). All this versus issuing a Statement.cancel() that effectively cancels all
the operations down to the fragment level. 
    
    I am now wondering whether I missied a corner case which will be addressed by doing the
timeout in the DrillCursor?


> Drill JDBC driver support Statement.setQueryTimeout(int)
> --------------------------------------------------------
>
>                 Key: DRILL-3640
>                 URL: https://issues.apache.org/jira/browse/DRILL-3640
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Client - JDBC
>    Affects Versions: 1.2.0
>            Reporter: Chun Chang
>            Assignee: Kunal Khatua
>             Fix For: 1.11.0
>
>
> It would be nice if we have this implemented. Run away queries can be automatically canceled
by setting the timeout. 
> java.sql.SQLFeatureNotSupportedException: Setting network timeout is not supported.
> 	at org.apache.drill.jdbc.impl.DrillStatementImpl.setQueryTimeout(DrillStatementImpl.java:152)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message