OmniaGM commented on code in PR #15335:
URL: https://github.com/apache/kafka/pull/15335#discussion_r1521445120


##########
core/src/main/scala/kafka/log/LogManager.scala:
##########
@@ -355,10 +355,11 @@ class LogManager(logDirs: Seq[File],
     } else if (logDir.getName.endsWith(UnifiedLog.StrayDirSuffix)) {
       addStrayLog(topicPartition, log)
       warn(s"Loaded stray log: $logDir")
-    } else if (shouldBeStrayKraftLog(log)) {
-      // Mark the partition directories we're not supposed to have as stray. 
We have to do this
-      // during log load because topics may have been recreated with the same 
name while a disk
-      // was offline.
+    } else if (isStray(log.topicId, topicPartition)) {
+      // Opposite of Zookeeper mode deleted topic in KRAFT mode can be 
recreated while it's not fully deleted from broker.
+      // As a result of this broker in KRAFT mode with one offline directory 
has no way to detect to-be-deleted replica in an offline directory earlier.
+      // However, broker need to mark the partition directories as stray 
during log load because topics may have been
+      // recreated with the same name while a log directory was offline.

Review Comment:
   updated with the suggestion



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

Reply via email to