muralibasani commented on code in PR #23547:
URL: https://github.com/apache/kafka/pull/23547#discussion_r4097237117
##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java:
##########
@@ -509,12 +509,22 @@ private boolean maybeSendAndPollTransactionalRequest() {
transactionManager.setInFlightCorrelationId(clientRequest.correlationId());
client.poll(retryBackoffMs, time.milliseconds());
return true;
+ } catch (AuthenticationException e) {
+ // The handler has already been removed from the pending queue.
Put it back so that
+ // TransactionManager#authenticationFailed handles it along with
any other pending requests.
+ transactionManager.retry(nextRequestHandler);
+ throw e;
} catch (IOException e) {
log.debug("Disconnect from {} while trying to send request {}.
Going " +
"to back off and retry.", targetNode, requestBuilder, e);
// We break here so that we pick up the FindCoordinator request
immediately.
maybeFindCoordinatorAndRetry(nextRequestHandler);
return true;
+ } catch (RuntimeException e) {
Review Comment:
this is too broad and treats all requests as fatal.
--
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]