hachikuji commented on a change in pull request #10909:
URL: https://github.com/apache/kafka/pull/10909#discussion_r680125967



##########
File path: raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java
##########
@@ -2317,7 +2318,7 @@ public void resign(int epoch) {
                 "current epoch {}", epoch, currentEpoch);
             return;
         } else if (!leaderAndEpoch.isLeader(quorum.localIdOrThrow())) {
-            throw new IllegalArgumentException("Cannot resign from epoch " + 
epoch +
+            throw new NotLeaderException("Cannot resign from epoch " + epoch +

Review comment:
       In a similar vein, I think we can keep this as 
`IllegalArgumentException`. The client has attempted to resign from an epoch in 
which this node is not the leader.




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