You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Andrew Schofield (Jira)" <ji...@apache.org> on 2024/12/05 20:09:00 UTC

[jira] [Resolved] (KAFKA-18129) `SharePartition#maybeInitialize` should complete the future outsize the write lock

     [ https://issues.apache.org/jira/browse/KAFKA-18129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Schofield resolved KAFKA-18129.
--------------------------------------
    Resolution: Fixed

> `SharePartition#maybeInitialize` should complete the future outsize the write lock
> ----------------------------------------------------------------------------------
>
>                 Key: KAFKA-18129
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18129
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Abhinav Dixit
>            Assignee: Abhinav Dixit
>            Priority: Major
>
> In reference to comment [https://github.com/apache/kafka/pull/17957#discussion_r1862570482] ,
> It might be better not to complete the future while holding the write lock. The registered action for the {{future}} could potentially try to acquire another lock that is held by a different thread, which, in turn, could be waiting on the write lock - resulting in a deadlock.
> In short, I prefer to narrow the scope of the write lock to avoid potential deadlock issues.



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