dajac commented on code in PR #12181:
URL: https://github.com/apache/kafka/pull/12181#discussion_r892122381


##########
core/src/main/scala/kafka/cluster/Partition.scala:
##########
@@ -1588,6 +1635,10 @@ class Partition(val topicPartition: TopicPartition,
       case Errors.INVALID_REQUEST =>
         debug(s"Failed to alter partition to $proposedIsrState because the 
request is invalid. Giving up.")
         false
+      case Errors.NEW_LEADER_ELECTED =>
+        // This is only raised in KRaft mode.
+        debug(s"ISR updated to ${partitionState.isr.mkString(",")} but this 
broker is not longer the leader.")

Review Comment:
   > I think this is handling the situation where the current leader gets 
kicked out of the replica set and the ISR after a reassignment completes?
   
   Right. This is how I understand it. I have added a comment and rephrases the 
log. Let me know what you think.



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