drawxy commented on code in PR #13847: URL: https://github.com/apache/kafka/pull/13847#discussion_r1235172202
########## core/src/main/scala/kafka/server/ReplicaManager.scala: ########## @@ -1808,7 +1809,10 @@ class ReplicaManager(val config: KafkaConfig, // pause cleaning for partitions that are being moved and start ReplicaAlterDirThread to move // replica from source dir to destination dir - logManager.abortAndPauseCleaning(topicPartition) + replicaAlterLogDirsManager.getFetcher(topicPartition) match { Review Comment: In general, we should pause cleaning only once during altering log dir. Because there is a counter (kafka.log.LogCleaningPaused) for how many times the cleaning of topic partition has been paused and the fetcher only subtracts the counter by one after altering completed. And the cleaning will only be resumed when the counter is reduced to 0. But currently every time broker recives a LeaderAndISR request about the parition being altering log dir, it would call the abortAndPauseCleaning. Therefore, during altering log dir, a LeaderAndISR about that partition would disable the log cleaning of that partition forever. -- 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