m1a2st commented on code in PR #20334:
URL: https://github.com/apache/kafka/pull/20334#discussion_r2290633025


##########
server/src/main/java/org/apache/kafka/server/config/AbstractKafkaConfig.java:
##########
@@ -79,7 +80,13 @@ public AbstractKafkaConfig(ConfigDef definition, Map<?, ?> 
originals, Map<String
     }
 
     public List<String> logDirs() {
-        return 
Csv.parseCsvList(Optional.ofNullable(getString(ServerLogConfigs.LOG_DIRS_CONFIG)).orElse(getString(ServerLogConfigs.LOG_DIR_CONFIG)));
+        return Optional.ofNullable(getList(ServerLogConfigs.LOG_DIRS_CONFIG))
+                .orElse(Stream.of(getString(ServerLogConfigs.LOG_DIR_CONFIG))
+                        .map(String::trim).filter(s -> !s.isEmpty()).toList()

Review Comment:
   I think we still need to split the LOG_DIRS_CONFIG, even if it only contains 
a single value. The previous logic parsed the LOG_DIR_CONFIG string and split 
it using \s*,\s*, and there is a test case that verifies this scenario.
   
   
https://github.com/apache/kafka/blob/0202721b4c175c606c3d079e602fe33e8faea018/core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala#L1553



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