You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "clolov (via GitHub)" <gi...@apache.org> on 2023/06/19 10:51:42 UTC

[GitHub] [kafka] clolov commented on a diff in pull request #13847: KAFKA-15082: The log retention policy doesn't take effect after altering log dir

clolov commented on code in PR #13847:
URL: https://github.com/apache/kafka/pull/13847#discussion_r1233880437


##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -881,6 +881,7 @@ class ReplicaManager(val config: KafkaConfig,
               if (partition.futureReplicaDirChanged(destinationDir)) {
                 replicaAlterLogDirsManager.removeFetcherForPartitions(Set(topicPartition))
                 partition.removeFutureLocalReplica()
+                logManager.resumeCleaning(topicPartition)

Review Comment:
   In general, I agree with this change. In this case we should resume cleaning because we do not know when or whether the subsequent LeaderAndISR request will arrive. Is there a way you can test this with a unit test(s)?



##########
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:
   Can you please explain the reasoning behind introducing this? I understand that you are trying to save a call to abortAndPauseCleaning, but I do not understand why



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org