You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Kunal Khatua <kk...@mapr.com> on 2017/06/23 01:09:24 UTC

Semantics of a JDBC Statement Timeout

I had a question that I don't quite have an answer for.


I was looking at this resource to understand what should happen when a JDBC Statement timeouts out.

http://www.cubrid.org/blog/understanding-jdbc-internals-and-timeout-configuration


I know the clock starts when one of the many Statemtent#execute API variants are called.


However, what I'm wondering is whether the timeout applies only to the execution or to the entire life-span of the Statement (once an execute has been called and the timeout countdown triggered).


I originally thought it was the latter, which means that the produced ResultSet should also stop providing any records. But if that is the case, then slow clients will potentially hit timeouts easily before consuming the results.


I know the plan execution is done lazily, i.e. only after the first call to the created ResultSet.next() is made... but that's an implementation detail.


Any comments? (not sure if modifying the JDBC API to define a ResultSet#timeout is correct).


 ~ Kunal

<http://www.mapr.com/>