showuon commented on a change in pull request #11022:
URL: https://github.com/apache/kafka/pull/11022#discussion_r669487271
##########
File path:
clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeConsumerGroupsHandler.java
##########
@@ -103,6 +104,12 @@ public String apiName() {
return new DescribeGroupsRequest.Builder(data);
}
+ private void validateGroupsNotEmpty(List<DescribedGroup> describedGroups) {
+ if (describedGroups.isEmpty()) {
+ throw new InvalidGroupIdException("No consumer group found");
+ }
+ }
Review comment:
Before KIP-699, there's the check:
```java
if (describedGroups.isEmpty()) {
context.future().completeExceptionally(
new InvalidGroupIdException("No consumer group found for
GroupId: " + context.groupId()));
return;
}
```
But, you're right, the exception thrown will not return back to requester.
Also, because there's no group found, we cannot have a failed key return
because we need a group in key.
Removed it since it should never happen.
--
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]