You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2025/01/27 17:41:00 UTC
[jira] [Created] (IGNITE-24323) Calcite engine. Query execution inside UDF leads to deadlock
Aleksey Plekhanov created IGNITE-24323:
------------------------------------------
Summary: 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
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)