jolshan commented on a change in pull request #9626: URL: https://github.com/apache/kafka/pull/9626#discussion_r543488660
########## File path: core/src/main/scala/kafka/log/Log.scala ########## @@ -1021,6 +1036,13 @@ class Log(@volatile private var _dir: File, // re-initialize leader epoch cache so that LeaderEpochCheckpointFile.checkpoint can correctly reference // the checkpoint file in renamed log directory initializeLeaderEpochCache() + if (!partitionMetadataFile.isEmpty && !partitionMetadataFile.get.isEmpty()) { + val partitionMetadata = partitionMetadataFile.get.read() + initializePartitionMetadata() + partitionMetadataFile.get.write(partitionMetadata.topicId) Review comment: Perhaps my understading is wrong, but if we rename the directory, do we need to create the file in the new directory? With the same topic ID and such as before. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org