[ 
https://issues.apache.org/jira/browse/KAFKA-7781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16732009#comment-16732009
 ] 

ASF GitHub Bot commented on KAFKA-7781:
---------------------------------------

kamalcph commented on pull request #6082: KAFKA-7781: Add validation check for 
"retention.ms" property.
URL: https://github.com/apache/kafka/pull/6082
 
 
   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.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
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 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)

Reply via email to