clolov commented on code in PR #14161: URL: https://github.com/apache/kafka/pull/14161#discussion_r1301784533
########## core/src/main/scala/kafka/log/LogManager.scala: ########## @@ -870,12 +870,14 @@ class LogManager(logDirs: Seq[File], * Update the configuration of the provided topic. */ def updateTopicConfig(topic: String, - newTopicConfig: Properties): Unit = { + newTopicConfig: Properties, + isRemoteLogStorageSystemEnabled: Boolean): Unit = { topicConfigUpdated(topic) val logs = logsByTopic(topic) + // Combine the default properties with the overrides in zk to create the new LogConfig + val newLogConfig = LogConfig.fromProps(currentDefaultConfig.originals, newTopicConfig) + LogConfig.validateTopicLogConfigValues(newLogConfig.values(), isRemoteLogStorageSystemEnabled, true) if (logs.nonEmpty) { - // Combine the default properties with the overrides in zk to create the new LogConfig Review Comment: I discovered this with the integration tests. I believe we should carry out the validation of the topic even if nothing has been produced yet and as such no logs have materialised. Otherwise, if someone decides to 1) create a tiered topic 2) switch off tiered storage cluster-wide this validation will merrily let it pass in its previous form. -- 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