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/03/30 06:13:05 UTC
[GitHub] [kafka] yun-yun commented on a change in pull request #11963: KAFKA-13777: Fix FetchResponse#responseData: Assignment of lazy-initialized members should be the last step with double-checked locking
yun-yun commented on a change in pull request #11963:
URL: https://github.com/apache/kafka/pull/11963#discussion_r838152794
##########
File path: clients/src/main/java/org/apache/kafka/common/requests/FetchResponse.java
##########
@@ -100,7 +100,8 @@ public Errors error() {
if (responseData == null) {
synchronized (this) {
if (responseData == null) {
- responseData = new LinkedHashMap<>();
+ final LinkedHashMap<TopicPartition, FetchResponseData.PartitionData> responseDataTmp =
Review comment:
Thank you for your advice. Since English is not my mother tongue, I would like to write the sentence "We are doing this to avoid other threads accessing a half-initialized object."
--
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