[
https://issues.apache.org/jira/browse/IGNITE-24323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103574#comment-18103574
]
Ignite TC Bot commented on IGNITE-24323:
----------------------------------------
Docs-required triage: removed only the Docs Required flag because the linked
documentation follow-up IGNITE-24401 is complete and merged in PR #13248 /
commit 9d67e0d13499f7408feddd93a749a7ff0d687a81. Verified locally on current
master: the Calcite code has the
IGNITE_CALCITE_USE_QUERY_BLOCKING_TASK_EXECUTOR switch and
QueryBlockingTaskExecutor, and docs/_docs/SQL/custom-sql-func.adoc documents
nested SQL queries from UDFs plus the required query thread pool sizing.
Release Notes Required was preserved.
> Calcite engine. Query execution inside UDF leads to deadlock
> ------------------------------------------------------------
>
> Key: IGNITE-24323
> URL: https://issues.apache.org/jira/browse/IGNITE-24323
> Project: Ignite
> Issue Type: Bug
> Reporter: Aleksey Plekhanov
> Assignee: Aleksey Plekhanov
> Priority: Major
> Labels: calcite, ise
> Fix For: 2.18
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> We have striped executor to execute query tasks. Thread for query/fragment on
> each node is fixed and defined by hash of query ID and fragment ID. If user
> created user defined function and try to execute some query inside it, it can
> lead to deadlock, since task execution thread blocked by new synchronous
> query execution request and the new query can be assigned to the same thread.
> For H2-based SQL engine threads are no binded to the query and there is no
> such problem.
> For Calcite-based SQL engine we use non thread safe datastructures in tasks.
> To workaround this problem we can use regular IgniteThreadPoolExecutor, but
> need to ensure that there are no tasks concurrently executing for the same
> query/fragment.
> Also, perhaps this approach can affect performance and should be enabled by
> some property explicitly only for users that require this mode.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)