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


##########
core/src/main/scala/kafka/log/LogManager.scala:
##########
@@ -1215,15 +1227,22 @@ class LogManager(logDirs: Seq[File],
             cleaner.updateCheckpoints(removedLog.parentDirFile, 
partitionToRemove = Option(topicPartition))
           }
         }
-        removedLog.renameDir(UnifiedLog.logDeleteDirName(topicPartition), 
false)
+        if (isStray) {
+          // Move aside stray partitions, don't delete them
+          removedLog.renameDir(UnifiedLog.logStrayDirName(topicPartition), 
false)
+          info(s"Log for partition ${removedLog.topicPartition} is renamed to 
${removedLog.dir.getAbsolutePath}")

Review Comment:
   We should mention that it is a stray log, right? i.e. that it wasn't found 
in the LeaderAndIsrRequest



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