showuon commented on a change in pull request #11035:
URL: https://github.com/apache/kafka/pull/11035#discussion_r669549464
##########
File path:
clients/src/main/java/org/apache/kafka/clients/admin/internals/RemoveMembersFromConsumerGroupHandler.java
##########
@@ -82,52 +83,114 @@ public String apiName() {
final LeaveGroupResponse response = (LeaveGroupResponse)
abstractResponse;
Map<CoordinatorKey, Map<MemberIdentity, Errors>> completed = new
HashMap<>();
Map<CoordinatorKey, Throwable> failed = new HashMap<>();
- List<CoordinatorKey> unmapped = new ArrayList<>();
+ final Set<CoordinatorKey> groupsToUnmap = new HashSet<>();
+ final Set<CoordinatorKey> groupsToRetry = new HashSet<>();
- final Errors error = Errors.forCode(response.data().errorCode());
+ final Errors error = response.topLevelError();
if (error != Errors.NONE) {
- handleError(groupId, error, failed, unmapped);
+ handleGroupError(groupId, error, failed, groupsToUnmap,
groupsToRetry);
} else {
final Map<MemberIdentity, Errors> memberErrors = new HashMap<>();
for (MemberResponse memberResponse : response.memberResponses()) {
+ Errors memberError =
Errors.forCode(memberResponse.errorCode());
+ String memberId = memberResponse.memberId();
+
+ if (memberError != Errors.NONE) {
+ handleMemberError(groupId, memberId, memberError,
groupsToUnmap, groupsToRetry);
Review comment:
Thanks for the question. I checked broker code, and confirmed that all
member response only contain member level errors, not group level or
coordinator level. I remove it. Thanks.
--
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]