jsancio commented on code in PR #13765: URL: https://github.com/apache/kafka/pull/13765#discussion_r1218098813
########## metadata/src/main/java/org/apache/kafka/controller/PartitionChangeBuilder.java: ########## @@ -260,11 +265,17 @@ private void tryElection(PartitionChangeRecord record) { * NO_LEADER_CHANGE, a leader epoch bump will automatically occur. That takes care of * case 1. In this function, we check for cases 2 and 3, and handle them by manually * setting record.leader to the current leader. + * + * In MV before 3.6 there was a bug (KAFKA-15021) in the brokers' replica manager + * that required that the leader epoch be bump whenever the ISR shrank. In MV 3.6 this leader + * bump is not required when the ISR shrinks. */ void triggerLeaderEpochBumpIfNeeded(PartitionChangeRecord record) { Review Comment: Correct. The `Replica.contains` check is subtle but it returns `true` if the second list is a subset of the first list. I added a comment about this. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org