You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Kamal Chandraprakash (JIRA)" <ji...@apache.org> on 2019/01/02 11:43:00 UTC

[jira] [Created] (KAFKA-7781) Add validation check for Topic retention.ms property

Kamal Chandraprakash created KAFKA-7781:
-------------------------------------------

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


Using AdminClient#alterConfigs, topic _retention.ms_ property can be assigned to a value lesser than -1. This leads to inconsistency while describing the topic configuration. We should not allow values lesser than -1. In server.properties, if _log.retention.ms_ configured to a value lesser 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 lesser than zero. To maintain consistency, we should add the validation check.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)