You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/06/08 09:17:24 UTC

[GitHub] [kafka] dajac commented on a diff in pull request #12181: KAFKA-13916; Fenced replicas should not be allowed to join the ISR in KRaft (KIP-841, Part 2)

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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org