[
https://issues.apache.org/jira/browse/IGNITE-16502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17490345#comment-17490345
]
Konstantin Orlov commented on IGNITE-16502:
-------------------------------------------
The issue was caused by deadlock in QueryPlanCache.
To deserialize the fragment, we need to get sure that current node is up to
date with a schema of the initiator node. To do this we start to wait till the
all required tables will be created locally. The problem here is we are holding
the lock for a bucket in CHM at this particular moment. When the node finishes
to handle distributed event, it fires a local event. The handler in the
SqlQueryProcessor listens for this local event, creates any necessary
structures, and then tries to clear the plan cache. But clearing a CHM requires
an acquiring a lock, so here we are.
> Some tests in ItMixedQueriesTest could hang
> -------------------------------------------
>
> Key: IGNITE-16502
> URL: https://issues.apache.org/jira/browse/IGNITE-16502
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Mirza Aliev
> Assignee: Konstantin Orlov
> Priority: Blocker
> Labels: ignite-3
> Attachments: Full thread dump
>
>
> Steps to reproduce:
> * Run the whole {{ItMixedQueriesTest}}
> * Some test could hang (For example,
> {{testIgniteSchemaAwaresAlterTableCommand}})
> Thread dumps shows that some threads are waiting
> * {{at
> org.apache.ignite.internal.sql.engine.exec.rel.RootNode.exchangeBuffers(RootNode.java:257)}},
> * {{at
> org.apache.ignite.internal.table.distributed.TableManager.join(TableManager.java:1219)}},
> * {{at
> org.apache.ignite.internal.table.distributed.TableManager.createTableLocally(TableManager.java:550)}}
> The whole thread dump is attached.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)