clolov commented on code in PR #16615: URL: https://github.com/apache/kafka/pull/16615#discussion_r1681239768
########## core/src/main/scala/kafka/server/ReplicaManager.scala: ########## @@ -2762,7 +2763,12 @@ class ReplicaManager(val config: KafkaConfig, replicaFetcherManager.shutdownIdleFetcherThreads() replicaAlterLogDirsManager.shutdownIdleFetcherThreads() - remoteLogManager.foreach(rlm => rlm.onLeadershipChange(leaderChangedPartitions.asJava, followerChangedPartitions.asJava, localChanges.topicIds())) + val isTieredStateEnabled = getLogConfig(localChanges.deletes.asScala.head).get.getBoolean(TopicConfig.REMOTE_LOG_STORAGE_ENABLE_CONFIG) + + remoteLogManager.foreach(rlm => { + rlm.validateCopyAndExpireTasks(isTieredStateEnabled, leaderChangedPartitions.asJava, localChanges.topicIds()) + rlm.onLeadershipChange(leaderChangedPartitions.asJava, followerChangedPartitions.asJava, localChanges.topicIds()) Review Comment: This method delegates to two further methods in RLM called doHandleLeaderPartition and doHandleFollowerPartition. Is it not better to try and put the logic of validateCopyAndExpireTasks in them? -- 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