AndrewJSchofield commented on code in PR #14111: URL: https://github.com/apache/kafka/pull/14111#discussion_r1284873983
########## clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java: ########## @@ -701,7 +713,9 @@ private long partitionReady(Cluster cluster, long nowMs, String topic, } waitedTimeMs = batch.waitedTimeMs(nowMs); - backingOff = batch.attempts() > 0 && waitedTimeMs < retryBackoffMs; + backingOff = !batch.hasLeaderChanged(leader) && + batch.attempts() > 0 && + waitedTimeMs < retryBackoff.backoff(batch.attempts() - 1); Review Comment: Done -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org