lianetm commented on code in PR #17549:
URL: https://github.com/apache/kafka/pull/17549#discussion_r1814788055


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -1293,17 +1287,16 @@ public void setInflightCommitStatus(final boolean 
inflightCommitStatus) {
     }
 
     static class MemberInfo {
-        Optional<String> memberId;
+        String memberId = "";

Review Comment:
   taking this a step further, I wonder if it would be clearer if this 
commitManager (and this MemberInfo), just take the memberId as constructor 
parameter. The memberId is generated by the membershipMgr once at startup, 
won't change, so it could pass it on to the commitManager upon creation here:
   
https://github.com/apache/kafka/blob/553e6b4c6d912b3b619b5a1a5263b616b6d3f62e/clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestManagers.java#L197
 (creating membershipMgr first)
   Then the `onMemberEpochUpdated` would only receive the epoch, which is what 
changes. What do you think?
   



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