[ 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)