OmniaGM commented on code in PR #15968:
URL: https://github.com/apache/kafka/pull/15968#discussion_r1635500959
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java:
##########
@@ -610,7 +611,9 @@ private void handleProduceResponse(ClientResponse response,
Map<TopicPartition,
// This will be set by completeBatch.
Map<TopicPartition, Metadata.LeaderIdAndEpoch>
partitionsWithUpdatedLeaderInfo = new HashMap<>();
produceResponse.data().responses().forEach(r ->
r.partitionResponses().forEach(p -> {
- TopicPartition tp = new TopicPartition(r.name(),
p.index());
+ // Version 12 drop topic name and add support to topic id.
However, metadata can be used to map topic id to topic name.
+ String topicName = (r.name() == null ||
r.name().isEmpty()) ? metadata.topicNames().get(r.topicId()) : r.name();
Review Comment:
Hi @jolshan sorry for taking too long to get back to you on this. I have
added `ApiVersions::maxSupportedProduceVersion` to determine what the supported
version supported on the cluster. Regarding the tests for these combination of
old/new producer with old/new broker are all covered in the system tests
`tests/kafkatest/tests/core/compatibility_test_new_broker_test.py` and
`tests/kafkatest/tests/client/client_compatibility_produce_consume_test.py`. I
am trying to add another one to test the same while deleting topic and
leadership changes but not sure if we really need to cover this or not as these
are covered in the integration tests.
--
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]