rajinisivaram commented on a change in pull request #9406: URL: https://github.com/apache/kafka/pull/9406#discussion_r509190126
########## File path: clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java ########## @@ -444,10 +444,21 @@ private boolean maybeSendAndPollTransactionalRequest() { AbstractRequest.Builder<?> requestBuilder = nextRequestHandler.requestBuilder(); Node targetNode = null; try { - targetNode = awaitNodeReady(nextRequestHandler.coordinatorType()); - if (targetNode == null) { + FindCoordinatorRequest.CoordinatorType coordinatorType = nextRequestHandler.coordinatorType(); + targetNode = coordinatorType != null ? + transactionManager.coordinator(coordinatorType) : + client.leastLoadedNode(time.milliseconds()); + if (targetNode != null) { + awaitNodeReady(targetNode, coordinatorType); Review comment: @chia7712 Thanks for the review. Good point, added check to retry in that case, also added unit test. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org