soarez commented on code in PR #14881: URL: https://github.com/apache/kafka/pull/14881#discussion_r1420675158
########## core/src/main/scala/kafka/server/ReplicaManager.scala: ########## @@ -2666,8 +2648,8 @@ class ReplicaManager(val config: KafkaConfig, // is unavailable. This is required to ensure that we include the partition's // high watermark in the checkpoint file (see KAFKA-1647). val state = info.partition.toLeaderAndIsrPartitionState(tp, isNew) - val isNewLeaderEpoch = partition.makeFollower(state, offsetCheckpoints, Some(info.topicId)) - + val isNewLeaderEpoch = partition.makeFollower(state, offsetCheckpoints, Some(info.topicId), partitionDirectoryId) + maybeUpdateTopicAssignment(partition, partitionDirectoryId) Review Comment: Apologies, you're right. I still think does can create duplicates. I think maybe we should extend `TopicDelta.localChanges` to also consider changes to the assigned directory to replicas hosted in the broker. Then we can gate calling `maybeUpdateTopicAssignment` unless `localChanges.directoryIds` is empty. -- 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