gitlw commented on code in PR #12029: URL: https://github.com/apache/kafka/pull/12029#discussion_r861303845
########## core/src/main/scala/kafka/log/UnifiedLog.scala: ########## @@ -674,21 +682,29 @@ class UnifiedLog(@volatile var logStartOffset: Long, } /** - * Rename the directory of the local log + * Rename the directory of the local log. If the log's directory is being renamed for async deletion due to a + * StopReplica request, then the shouldReinitialize parameter should be set to false, otherwise it should be set to true. * + * @param name The new name that this log's directory is being renamed to + * @param shouldReinitialize Whether the log's metadata should be reinitialized after renaming * @throws KafkaStorageException if rename fails */ - def renameDir(name: String): Unit = { + def renameDir(name: String, shouldReinitialize: Boolean): Unit = { lock synchronized { maybeHandleIOException(s"Error while renaming dir for $topicPartition in log dir ${dir.getParent}") { // Flush partitionMetadata file before initializing again maybeFlushMetadataFile() Review Comment: @dajac I see what you mean. I've incorporated this change in the last commit. Thanks for this 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