[ 
https://issues.apache.org/jira/browse/KAFKA-7781?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manikumar resolved KAFKA-7781.
------------------------------
       Resolution: Fixed
         Assignee: Kamal Chandraprakash
    Fix Version/s: 2.2.0

> 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
>            Assignee: Kamal Chandraprakash
>            Priority: Major
>             Fix For: 2.2.0
>
>
> 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)

Reply via email to