kamalcph commented on code in PR #14176:
URL: https://github.com/apache/kafka/pull/14176#discussion_r1294167123


##########
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:
   `KafkaConfig` class is in core module. `storage` module doesn't have 
dependency on the `core`. If we have to do the below change, then we have to 
make `core` as dependency for `storage`. Let me know if it is OK to add it:
   
   ```
   public static LogConfig validateAndExtractLogConfig(kafka.server.KafkaConfig 
kafkaConfig) {
       Properties props = kafkaConfig.extractLogConfigMap();
       validateValues(props);
       if (kafkaConfig.isRemoteLogStorageSystemEnabled()) {
           validateRemoteStorageRetentionSize(props);
           validateRemoteStorageRetentionTime(props);
       }
       return new LogConfig(props);
   }
   ```    



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

Reply via email to