chia7712 commented on code in PR #21176:
URL: https://github.com/apache/kafka/pull/21176#discussion_r2637840041


##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -1798,13 +1798,17 @@ class KafkaApis(val requestChannel: RequestChannel,
               val error = if (exception == null) {
                 Errors.NONE
               } else {
-                Errors.forException(exception) match {
-                  case Errors.COORDINATOR_NOT_AVAILABLE | 
Errors.COORDINATOR_LOAD_IN_PROGRESS | Errors.NOT_COORDINATOR =>
-                    // The transaction coordinator does not expect those 
errors so we translate them
-                    // to NOT_LEADER_OR_FOLLOWER to signal to it that the 
coordinator is not ready yet.
-                    Errors.NOT_LEADER_OR_FOLLOWER
-                  case error =>
-                    error
+                if 
(IdempotentTransactionMarkerException.isInstanceOf(exception))

Review Comment:
   please also add comments 



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