[
https://issues.apache.org/jira/browse/KAFKA-13791?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luke Chen resolved KAFKA-13791.
-------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
> Fix FetchResponse#`fetchData` and `forgottenTopics`: Assignment of
> lazy-initialized members should be the last step with double-checked locking
> -----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-13791
> URL: https://issues.apache.org/jira/browse/KAFKA-13791
> Project: Kafka
> Issue Type: Bug
> Components: clients
> Affects Versions: 3.0.1
> Reporter: YunKui Lu
> Priority: Trivial
> Fix For: 3.3.0
>
>
> Double-checked locking can be used for lazy initialization of volatile
> fields, but only if field assignment is the last step in the synchronized
> block. Otherwise, you run the risk of threads accessing a half-initialized
> object.
> The problem is consistent with
> [KAFKA-13777|https://issues.apache.org/jira/projects/KAFKA/issues/KAFKA-13777]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)