showuon commented on code in PR #14176: URL: https://github.com/apache/kafka/pull/14176#discussion_r1294181153
########## storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java: ########## @@ -265,7 +266,12 @@ public Optional<String> serverConfigName(String configName) { .define(TopicConfig.LOCAL_LOG_RETENTION_MS_CONFIG, LONG, DEFAULT_LOCAL_RETENTION_MS, atLeast(-2), MEDIUM, TopicConfig.LOCAL_LOG_RETENTION_MS_DOC) .define(TopicConfig.LOCAL_LOG_RETENTION_BYTES_CONFIG, LONG, DEFAULT_LOCAL_RETENTION_BYTES, atLeast(-2), MEDIUM, - TopicConfig.LOCAL_LOG_RETENTION_BYTES_DOC); + TopicConfig.LOCAL_LOG_RETENTION_BYTES_DOC) + // RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP is defined here to ensure that when system + // level remote storage functionality is disabled, topics cannot be configured to use remote storage. + .defineInternal(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP, BOOLEAN, + RemoteLogManagerConfig.DEFAULT_REMOTE_LOG_STORAGE_SYSTEM_ENABLE, null, MEDIUM, + RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_DOC); Review Comment: I remembered there will be cycle dependency issue there. So, if we only care about `REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP` value currently, could we just pass that into `LogConfig.validate`? I.e. `LogConfig.validate(config, sysRemoteStorageEnabled)`, or like what we did now, but add one more parameter: ``` LogConfig.validate(config, kafkaConfig.map(_.extractLogConfigMap).getOrElse(Collections.emptyMap()), sysRemoteStorageEnabled) ``` -- 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