[ https://issues.apache.org/jira/browse/KAFKA-7781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16741575#comment-16741575 ]
ASF GitHub Bot commented on KAFKA-7781: --------------------------------------- omkreddy commented on pull request #6082: KAFKA-7781: Add validation check for retention.ms topic property. URL: https://github.com/apache/kafka/pull/6082 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > Add validation check for Topic retention.ms property > ---------------------------------------------------- > > Key: KAFKA-7781 > URL: https://issues.apache.org/jira/browse/KAFKA-7781 > Project: Kafka > Issue Type: Bug > Reporter: Kamal Chandraprakash > Priority: Major > > Using AdminClient#alterConfigs, topic _retention.ms_ property can be assigned > to a value less than -1. This leads to inconsistency while describing the > topic configuration. We should not allow values less than -1. In > server.properties, if _log.retention.ms_ configured to a value less than > zero, it's > [set|https://github.com/apache/kafka/blob/9295444d48eb057900ef09f1176e34b37331f60b/core/src/main/scala/kafka/server/KafkaConfig.scala#L1320] > as -1. > This doesn't create any issue in log segment deletion, as the > [condition|https://github.com/apache/kafka/blob/9295444d48eb057900ef09f1176e34b37331f60b/core/src/main/scala/kafka/log/Log.scala#L1466] > for infinite log retention checks for value less than zero. To maintain > consistency, we should add the validation check. -- This message was sent by Atlassian JIRA (v7.6.3#76005)