kirktrue commented on code in PR #16031:
URL: https://github.com/apache/kafka/pull/16031#discussion_r1626748855


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/CommitRequestManager.java:
##########
@@ -319,11 +326,11 @@ private void 
autoCommitSyncBeforeRevocationWithRetries(OffsetCommitRequestState
             if (error == null) {
                 result.complete(null);
             } else {
-                if (error instanceof RetriableException || 
isStaleEpochErrorAndValidEpochAvailable(error)) {
-                    if (error instanceof TimeoutException && 
requestAttempt.isExpired()) {
-                        log.debug("Auto-commit sync before revocation timed 
out and won't be retried anymore");
-                        result.completeExceptionally(error);
-                    } else if (error instanceof 
UnknownTopicOrPartitionException) {
+                if (requestAttempt.isExpired()) {

Review Comment:
   I reverted the code so that we only check `isExpired()` on 
`RetriableException`s and added unit tests to verify behavior. PTAL.



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