Github user kkhatua commented on the issue:

    https://github.com/apache/drill/pull/858
  
    @laurentgo Within the DrillCursor, the only place I could do such a check 
was 
    
https://github.com/kkhatua/drill/blob/c51473859d1dd81cf70e857f729c3a8491b2834a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java#L582
    (Hosting a fork of this PR in this repo: 
https://github.com/kkhatua/drill/commits/altDrill3640 )
    
    My JDBC client for performance testing has a similar mechanism for JDBC 
drivers that don't support timeout, but allow for query cancellation by using a 
cancelling-trigger thread to sleep until the timeout, before waking up 
explicitly cancelling the query. I've simply replicated behaviour that in the 
Drill JDBC package. Having a constant check on the time remaining using a 
system call like {{System.currentTimeMillis()}} is actually expensive, which is 
why I didn't want to have the DrillCursor contantly do that check before 
throwing an exception. Can you point to me on which async framework should I be 
looking at as well ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to