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

Ivan Daschinsky commented on IGNITE-16151:
------------------------------------------

[~vkulichenko] I have linked some tickets related to this problem. 
Unfortunately, it is quite easy to set VolcanoPlanner in infinite loop because 
of bugs in rules. There is only one mechanism in Calcite to break this loop -- 
override one specific method and set in this method cancelFlag. VolcanoPlanner 
in each iteration call this method and check if cancel flag set. If it was set, 
Calcite would break loop and throw VolcanoTimeoutException.  When this 
exception is thrown, user should rewrite his or her SQL query. It is better to 
throw early than to infinitely hang all worker threads of client connection 
pool and node fail with OOM.

> Introduce timeout for calcite planner
> -------------------------------------
>
>                 Key: IGNITE-16151
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16151
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Ivan Daschinsky
>            Priority: Major
>              Labels: calcite, calcite2-required, calcite3-required
>
> Since it is quite common case that calcite planner can produce too many plans 
> and can planning infinitely, it is of crucial
> importance to be able to cancel this process on timeout.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to