Hi,

+1 for Tian Jiang ideas, 
And I think we can extend the session api to add one parameter to indicate the 
operation timeouts(insert、query and so on), besides we can implement the 
`setQueryTimeout()` method in JDBC.


Thanks,
---------------------------------------
Houliang Qi
BONC, Ltd
On 11/27/2020 09:55,Tian Jiang<[email protected]> wrote:
Greetings,


This is important indeed, but I have some suggestions:
1. This would best be based query cancellation, i.e., a query can be cancelled 
by a given interface, and the timed thread need only to call this interface to 
time out a query when needed. The merit of doing so is better abstraction and 
then we can readily implement `cancel()` in JDBC.


2. Query time out should be defined at query level, or at least session level. 
Users may often be running different types of queries at the same time, like 
short monitoring queries (milliseconds to seconds) and long analytic queries 
(hours to days), defining only one global timeout is seldom enough for complex 
applications.


Best
Tian Jiang
On 11/26/2020 21:32,Xiangwei Wei<[email protected]> wrote:
If a query takes too much time, we'd better interrupt this query instead of
hanging up the client.

The design doc is in [1]. Any advice is appreciated :D

A discussion is:
How long can the query be considered as time out? maybe 5min, 10min? We
need to set a default value, of course it can be modified by the user.

[1]
https://cwiki.apache.org/confluence/display/IOTDB/Query+over+time+design+doc

--
Best,
Xiangwei Wei

Reply via email to