[
https://issues.apache.org/jira/browse/KAFKA-15771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Divij Vaidya resolved KAFKA-15771.
----------------------------------
Resolution: Fixed
> ProduceRequest#partitionSizes() is not an atomic operation
> -----------------------------------------------------------
>
> Key: KAFKA-15771
> URL: https://issues.apache.org/jira/browse/KAFKA-15771
> Project: Kafka
> Issue Type: Bug
> Components: producer
> Reporter: Xiaobing Fang
> Assignee: Xiaobing Fang
> Priority: Trivial
> Fix For: 3.5.2, 3.7.0, 3.6.1
>
>
> Encountered a concurrency issue in method ProduceRequest#partitionSizes()
> while developing with Kafka. When both Thread 1 and Thread 2 concurrently
> call method ProduceRequest#partitionSizes(), Thread 2 may receive an
> incomplete or empty result if Thread 1 is still in the process of
> initializing partitionSizes. This is an incorrect state. the code to ensure
> that Thread 2 obtains the final state rather than an intermediate one.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)