showuon commented on code in PR #15230:
URL: https://github.com/apache/kafka/pull/15230#discussion_r1471145483


##########
core/src/main/scala/kafka/log/LogManager.scala:
##########
@@ -563,6 +565,18 @@ class LogManager(logDirs: Seq[File],
     startupWithConfigOverrides(defaultConfig, 
fetchTopicConfigOverrides(defaultConfig, topicNames))
   }
 
+  def deleteStrayKRaftReplicas(
+    brokerId: Int,
+    image: TopicsImage
+  ): Unit = {
+    val strayPartitions = findStrayReplicas(brokerId, image, allLogs)
+    strayPartitions.foreach(topicPartition => {
+      val log = getLog(topicPartition).get
+      log.renameDir(UnifiedLog.logStrayDirName(topicPartition), 
shouldReinitialize = true)
+      asyncDelete(topicPartition, false, false, true)

Review Comment:
   I didn't see this change. Did you miss it?



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