DL1231 commented on code in PR #19577:
URL: https://github.com/apache/kafka/pull/19577#discussion_r2447014064
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -732,7 +740,9 @@ public NetworkClientDelegate.UnsentRequest
toUnsentRequest() {
lastEpochSentOnCommit = Optional.empty();
}
- OffsetCommitRequest.Builder builder =
OffsetCommitRequest.Builder.forTopicNames(data);
+ OffsetCommitRequest.Builder builder = canUseTopicIds
+ ? OffsetCommitRequest.Builder.forTopicIdsOrNames(data,
true)
+ : OffsetCommitRequest.Builder.forTopicNames(data);
Review Comment:
> I'm afraid we cannot simply move on and generate a request forTopicNames
using the last stable version.
The `forTopicNames` uses version 9 to create the request, so it will not
fail.
https://github.com/apache/kafka/blob/92d9dc19b22529895c430bf2551b551cbfbcaad1/clients/src/main/java/org/apache/kafka/common/requests/OffsetCommitRequest.java#L58-L60
> So, should we just request metadata and return?
If no topic ID is available and only a metadata request is generated without
producing the actual commit request, this could result in permanent failure of
OffsetCommit requests for older servers (e.g., version 2.7) that do not support
topic IDs.
--
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]