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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org