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


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/util/UpdatedMembersAndTargetAssignmentView.java:
##########
@@ -85,12 +85,28 @@ public Map<String, A> targetAssignment() {
      * member for the same instance id, the previous static member's target 
assignment is moved to
      * the new member and the previous static member is removed from the view.
      *
-     * @param memberId   The member id.
-     * @param instanceId The instance id of the member, or {@code null} if the 
member is not static.
-     * @param member     The member to add or update.
+     * @param memberId           The member id.
+     * @param previousInstanceId The instance id the member had before the 
update, or {@code null}
+     *                           if the member was not static.
+     * @param instanceId         The instance id of the member, or {@code 
null} if the member is not
+     *                           static.
+     * @param member             The member to add or update.
      */
-    public void addOrUpdateMember(String memberId, String instanceId, M 
member) {
+    public void addOrUpdateMember(
+        String memberId,
+        String previousInstanceId,

Review Comment:
   Instead of passing the previous instance id, could we get it from the 
existing member in the map? `put` should provide the previous member if it 
exists.



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