mjsax commented on a change in pull request #8589:
URL: https://github.com/apache/kafka/pull/8589#discussion_r431354284



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/admin/RemoveMembersFromConsumerGroupResult.java
##########
@@ -51,9 +52,21 @@
             if (throwable != null) {
                 result.completeExceptionally(throwable);
             } else {
-                for (MemberToRemove memberToRemove : memberInfos) {
-                    if (maybeCompleteExceptionally(memberErrors, 
memberToRemove.toMemberIdentity(), result)) {
-                        return;
+                if (removeAll()) {

Review comment:
       Can we just do for both cases?
   ```
   for (Map.Entry<MemberIdentity, Errors> entry: memberErrors.entrySet()) {
       Exception exception = entry.getValue().exception();
       if (exception != null) {
           Throwable ex = new KafkaException("Encounter exception when trying 
to remove: "
                + entry.getKey(), exception);
           result.completeExceptionally(ex);
           return;
       }
   }
   ```
   
   The "issue" with using `memberInfos` is, that for the removeAll() case it's 
empty and we cannot use it. However, `memberErrors` should have an entry for 
all members for both cases?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to