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

Aleksey Plekhanov commented on IGNITE-24751:
--------------------------------------------

[~shishkovilja], it's not a deadlock and there are no problematic queries (or 
any query execution SQL inside UDF is problematic, since it holds thread and 
requires additional thread to execute, and this can lead to thread pool 
starvation).

So, I think, we should:
 * Add calcite thread pool to starvation monitoring
 * Print warning once (about wrong pool configuration) if striped pool 
(default) is configured and SQL is executed inside UDF 
 * Print info once (about possible pool starvation) if blocking pool is 
configured and SQL is executed inside UDF

WDYT?

> Calcite: print warning when blocking query pool was exhausted
> -------------------------------------------------------------
>
>                 Key: IGNITE-24751
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24751
>             Project: Ignite
>          Issue Type: Sub-task
>            Reporter: Ilya Shishkov
>            Assignee: Aleksey Plekhanov
>            Priority: Minor
>              Labels: calcite, ignite-2, ise
>         Attachments: QueryPoolExhaustingTest.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When {{QueryBlockingTaskExecutor}} of Calcite engine is used, query pool size 
> must be larger than any UDF nesting, otherwise query hanging will occur, eg.:
> # Query executor size is 2
> # Execute SQL containing first UDF
> # First UDF inside calls SQL query with another one UDF
> # Second UDF calls any SQL query and hangs
> # Warning about long running queries are printed in the log, but they do not 
> provide any information about query pool exhausting
> Reproducer:  [^QueryPoolExhaustingTest.patch] 
> It seems, that when {{QueryBlockingTaskExecutor}} is used we need:
> # Add detailed warning about deadlock and print information, how kill 
> problematic query
> # Add documentation about proper query thread pool size configuring
> Also, for all query pools starvation check can be added, eg.: periodically 
> check completed tasks count and pending queries.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to