CalvinConfluent commented on code in PR #20629:
URL: https://github.com/apache/kafka/pull/20629#discussion_r2404254253
##########
metadata/src/main/java/org/apache/kafka/controller/PartitionChangeBuilder.java:
##########
@@ -494,12 +494,10 @@ private void setAssignmentChanges(PartitionChangeRecord
record) {
private void maybeUpdateLastKnownLeader(PartitionChangeRecord record) {
if (!useLastKnownLeaderInBalancedRecovery ||
!eligibleLeaderReplicasEnabled) return;
- if (record.isr() != null && record.isr().isEmpty() &&
(partition.lastKnownElr.length != 1 ||
- partition.lastKnownElr[0] != partition.leader)) {
+ if (record.leader() == NO_LEADER && (partition.lastKnownElr.length ==
0)) {
Review Comment:
@chia7712 Thanks. Updated.
--
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]