chickenchickenlove commented on code in PR #23742:
URL: https://github.com/apache/kafka/pull/23742#discussion_r4371364653


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/TargetAssignmentBuilder.java:
##########
@@ -158,10 +158,13 @@ private Assignment newMemberAssignment(
         String memberId
     ) {
         MemberAssignment newMemberAssignment = 
newGroupAssignment.members().get(memberId);
-        if (newMemberAssignment != null) {
-            return new Assignment(newMemberAssignment.partitions());
-        } else {
+        if (newMemberAssignment == null) {
             return Assignment.EMPTY;
         }
+
+        // The output is only read by the coordinator. Assignor inputs are
+        // reconstructed from target assignment records during replay.
+        // So, we don't need defensive copy here.
+        return Assignment.of(newMemberAssignment.partitions());

Review Comment:
   Let me check the assignment offloading path first!



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