You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/04/01 02:52:49 UTC

[GitHub] [kafka] yun-yun opened a new pull request #11981: KAFKA-13791: Fix FetchResponse#`fetchData` and `forgottenTopics`: Assignment of lazy-initialized members should be the last step with double-checked locking

yun-yun opened a new pull request #11981:
URL: https://github.com/apache/kafka/pull/11981


   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)
   
   #https://github.com/apache/kafka/pull/11963


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org