rondagostino commented on a change in pull request #10039:
URL: https://github.com/apache/kafka/pull/10039#discussion_r569602196



##########
File path: core/src/main/scala/kafka/log/LogManager.scala
##########
@@ -402,7 +403,26 @@ class LogManager(logDirs: Seq[File],
   /**
    *  Start the background threads to flush logs and do log cleanup
    */
-  def startup(): Unit = {
+  def startup(retrieveTopicNames: () => Set[String]): Unit = {
+    startup(generateTopicLogConfigs(retrieveTopicNames))
+  }
+
+  // visible for testing
+  private[log] def generateTopicLogConfigs(retrieveTopicNames: () => 
Set[String]): Map[String, LogConfig] = {
+    val topicLogConfigs: mutable.Map[String, LogConfig] = mutable.Map()
+    val defaultProps = currentDefaultConfig.originals()
+    retrieveTopicNames().foreach { topicName =>
+      val overrides = configRepository.topicConfigs(topicName)
+      val logConfig = LogConfig.fromProps(defaultProps, overrides)
+      topicLogConfigs(topicName) = logConfig

Review comment:
       only add it if there are some overides




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


Reply via email to