dajac commented on code in PR #13231:
URL: https://github.com/apache/kafka/pull/13231#discussion_r1122921475
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/TransactionManager.java:
##########
@@ -1328,7 +1328,7 @@ Priority priority() {
@Override
public void handleResponse(AbstractResponse response) {
AddPartitionsToTxnResponse addPartitionsToTxnResponse =
(AddPartitionsToTxnResponse) response;
- Map<TopicPartition, Errors> errors =
addPartitionsToTxnResponse.errors();
+ Map<TopicPartition, Errors> errors =
addPartitionsToTxnResponse.errors().get(AddPartitionsToTxnResponse.V3_AND_BELOW_TXN_ID);
Review Comment:
Yeah, the check is probably not necessary. By the way, I find the idea of
having `V3_AND_BELOW_TXN_ID` for old version a bit confusing. I was wondering
if using `addPartitionsToTxnResponse.data().resultsByTopicV3AndBelow()` would
be a better alternative here. We only iterate over the Map so the Map is not
strictly required here. Have you considered something like this?
--
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]