dajac commented on code in PR #21008:
URL: https://github.com/apache/kafka/pull/21008#discussion_r2568744625


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -2354,16 +2357,18 @@ public void onResignation(
     }
 
     /**
-     * See {@link 
GroupCoordinator#onNewMetadataImage(CoordinatorMetadataImage, 
CoordinatorMetadataDelta)}.
+     * See {@link GroupCoordinator#onMetadataUpdate(MetadataDelta, 
MetadataImage)}.
      */
     @Override
-    public void onNewMetadataImage(
-        CoordinatorMetadataImage newImage,
-        CoordinatorMetadataDelta delta
+    public void onMetadataUpdate(
+        MetadataDelta delta,
+        MetadataImage newImage
     ) {
         throwIfNotActive();
-        metadataImage = newImage;
-        runtime.onNewMetadataImage(newImage, delta);
+        var wrappedImage = newImage == null ? null : new 
KRaftCoordinatorMetadataImage(newImage);
+        var wrappedDelta = delta == null ? null : new 
KRaftCoordinatorMetadataDelta(delta);

Review Comment:
   This is pretty ugly and it should not be here because the image and the 
delta can never be null. Unfortunately, we have a couple of tests passing nulls 
here. I will fix those separately and remove this code in a follow-up. I want 
the core change to be well scoped.



-- 
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]

Reply via email to