dajac commented on code in PR #21008:
URL: https://github.com/apache/kafka/pull/21008#discussion_r2568738134
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -343,9 +346,9 @@ public GroupCoordinatorService build() {
/**
* The metadata image to extract topic id to names map.
- * This is initialised when the {@link
GroupCoordinator#onNewMetadataImage(CoordinatorMetadataImage,
CoordinatorMetadataDelta)} is called
+ * This is initialised when the {@link
GroupCoordinator#onMetadataUpdate(MetadataDelta, MetadataImage)} is called
*/
- private CoordinatorMetadataImage metadataImage = null;
+ private volatile CoordinatorMetadataImage metadataImage = null;
Review Comment:
This is a bug. The attribute must be `volatile` because it is accessed from
multiple threads.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]