yyu1993 commented on code in PR #14545:
URL: https://github.com/apache/kafka/pull/14545#discussion_r1373695739


##########
core/src/main/scala/kafka/log/LogManager.scala:
##########
@@ -1216,15 +1228,21 @@ class LogManager(logDirs: Seq[File],
             cleaner.updateCheckpoints(removedLog.parentDirFile, 
partitionToRemove = Option(topicPartition))
           }
         }
-        removedLog.renameDir(UnifiedLog.logDeleteDirName(topicPartition), 
false)
+        if (isStray) {

Review Comment:
   Looks like we are only renaming the stray log dir and removing it from 
LogManager. Do we also want to add the logic on delayed stray log deletion? If 
we want to delete the stray logs immediately (more risky, and it might create 
conflicts with AK merge), I think we need to add it to the log deletion queue 
(by calling `addLogToBeDeleted(strayLog)`).
   
   Right now the log dir will be renamed to "-stray" but it will not be deleted 
by the broker. 



-- 
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]

Reply via email to