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


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -426,9 +429,43 @@ public CompletableFuture<ListGroupsResponseData> 
listGroups(
             return 
FutureUtils.failedFuture(Errors.COORDINATOR_NOT_AVAILABLE.exception());
         }
 
-        return FutureUtils.failedFuture(Errors.UNSUPPORTED_VERSION.exception(
-            "This API is not implemented yet."
-        ));
+        List<CompletableFuture<ListGroupsResponseData>> futures = new 
java.util.ArrayList<>(Collections.emptyList());
+        for (int i = 0; i < numPartitions; i++) {
+            futures.add(runtime.scheduleReadOperation("list_groups",
+                    new TopicPartition(Topic.GROUP_METADATA_TOPIC_NAME, i),
+                    (coordinator, __) -> coordinator.listGroups(context, 
request)

Review Comment:
   Basically 
[here](https://github.com/apache/kafka/pull/14271/files#diff-00f0f81cf13e66781777d94f7d2e68a581663385c37e98792507f2294c91bb09R418),
 you need to use `lastCommittedOffset` to ensure that you only read committed 
state. I don't know if we support the Stream API but the other APIs should 
accept an argument called `epoch`. You can use `lastCommittedOffset` as the 
`epoch.`



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to