You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Copilot (via GitHub)" <gi...@apache.org> on 2025/11/06 13:27:35 UTC

Re: [PR] KAFKA-19869: Mark streams groups records and APIs stable [kafka]

Copilot commented on code in PR #20841:
URL: https://github.com/apache/kafka/pull/20841#discussion_r2498966527


##########
clients/src/main/java/org/apache/kafka/clients/admin/internals/DescribeStreamsGroupsHandler.java:
##########
@@ -92,7 +92,7 @@ public StreamsGroupDescribeRequest.Builder buildBatchedRequest(int coordinatorId
         StreamsGroupDescribeRequestData data = new StreamsGroupDescribeRequestData()
             .setGroupIds(groupIds)
             .setIncludeAuthorizedOperations(includeAuthorizedOperations);
-        return new StreamsGroupDescribeRequest.Builder(data, true);
+        return new StreamsGroupDescribeRequest.Builder(data);

Review Comment:
   The removal of the `enableUnstableLastVersion` parameter changes the API behavior. The Builder constructor now defaults to `false` (via the no-arg ApiKeys constructor), which means it will use the stable version. However, this should be verified to ensure the constructor chain is correct. Looking at StreamsGroupDescribeRequest.Builder, the single-argument constructor calls `this(data, false)`, which is the intended behavior for stable APIs.
   ```suggestion
           return new StreamsGroupDescribeRequest.Builder(data, false);
   ```



##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/StreamsGroupHeartbeatRequestManager.java:
##########
@@ -506,7 +506,7 @@ private NetworkClientDelegate.UnsentRequest makeHeartbeatRequestAndHandleRespons
 
     private NetworkClientDelegate.UnsentRequest makeHeartbeatRequest(final long currentTimeMs) {
         NetworkClientDelegate.UnsentRequest request = new NetworkClientDelegate.UnsentRequest(
-            new StreamsGroupHeartbeatRequest.Builder(this.heartbeatState.buildRequestData(), true),
+            new StreamsGroupHeartbeatRequest.Builder(this.heartbeatState.buildRequestData()),

Review Comment:
   The removal of the `enableUnstableLastVersion` parameter changes the API behavior. The Builder constructor now defaults to `false` (via the no-arg ApiKeys constructor), which means it will use the stable version. However, this should be verified to ensure the constructor chain is correct. Looking at StreamsGroupHeartbeatRequest.Builder, the single-argument constructor calls `this(data, false)`, which is the intended behavior for stable APIs.
   ```suggestion
               new StreamsGroupHeartbeatRequest.Builder(this.heartbeatState.buildRequestData(), false),
   ```



-- 
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-unsubscribe@kafka.apache.org

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