chickenchickenlove commented on code in PR #21279:
URL: https://github.com/apache/kafka/pull/21279#discussion_r2752969628


##########
transaction-coordinator/src/main/java/org/apache/kafka/coordinator/transaction/RPCProducerIdManager.java:
##########
@@ -115,7 +115,7 @@ private void maybeRequestNextBlock() {
                     requestInFlight.compareAndSet(false, true)) {
                 sendRequest();
                 // Reset backoff after a successful send.
-                backoffDeadlineMs.set(NO_RETRY);
+                backoffDeadlineMs.compareAndSet(retryTimestamp, NO_RETRY);

Review Comment:
   Thanks for your comments! Good Idea 👍 
   I made an commit based on your comment.
   
   to preserve the existing semantics, I added code to set `backoffDeadlineMs` 
to `NO_RETRY` on the timeout path.
   
   A more conservative approach could be to call `handleUnsuccessfulResponse()` 
on `TIMEOUT` as well, so that we apply the same retry backoff. However, since 
the previous code path did not update `backoffDeadlineMs` on `onTimeout()`, I 
kept that behavior here to minimize any behavioral change in this PR.
   
   When you have bandwidth, please take another look. 🙇‍♂️ 
   



-- 
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]

Reply via email to