[
https://issues.apache.org/jira/browse/IGNITE-18170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roman Puchkovskiy resolved IGNITE-18170.
----------------------------------------
Resolution: Fixed
Fixed in IGNITE-18203
> Deadlock in TableManager#updateAssignmentInternal()
> ---------------------------------------------------
>
> Key: IGNITE-18170
> URL: https://issues.apache.org/jira/browse/IGNITE-18170
> Project: Ignite
> Issue Type: Bug
> Reporter: Roman Puchkovskiy
> Assignee: Roman Puchkovskiy
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
> Attachments: threads_report.txt
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Currently, {{TableManager#updateAssignmentsInternal}} is fully synchronous.
> The scenario is as follows:
> # {{updateAssignmentsInternal}} starts a RAFT group for a partition
> # {{FSMCallerImpl}} finds out that its applied index is below the group
> committed index, so it starts to apply the missing log entries in its
> {{init()}} method (this is still done synchronously)
> # While doing so, it invokes {{{}PartitionListener{}}}, which tries to
> execute an insert
> # To make an insert, a PK is needed, so it the insertion code tries to
> obtain a PK from its future like this: {{pkFuture.join()}}
> # That future is completed from {{{}IndexManager#createIndexLocally(){}}},
> which is invoked by {{ConfigurationNotifier}} later than
> {{updateassignmentsInternal}} in the same thread
> # As a result, the PK future cannot be completed before the sync
> {{updateAssignmentsInternal}} finishes its job and returns, and it cannot
> finish its job before the PK future is completed
> We should make {{updateAssignmentsInternal}} async.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)