junrao commented on code in PR #20492: URL: https://github.com/apache/kafka/pull/20492#discussion_r2380388209
########## core/src/main/scala/kafka/cluster/Partition.scala: ########## @@ -1658,7 +1658,7 @@ class Partition(val topicPartition: TopicPartition, def deleteRecordsOnLeader(offset: Long): LogDeleteRecordsResult = inReadLock(leaderIsrUpdateLock) { leaderLogIfLocal match { case Some(leaderLog) => - if (!leaderLog.config.delete) + if (!leaderLog.config.delete && leaderLog.config.compact) Review Comment: Good catch. This change seems reasonable to me. ########## docs/upgrade.html: ########## @@ -136,9 +136,11 @@ <h5><a id="upgrade_420_notable" href="#upgrade_420_notable">Notable changes in 4 settings. </li> <li> - The <code>cleanup.policy</code> is empty and <code>remote.storage.enable</code> is set to true, the + If <code>cleanup.policy</code> is empty and <code>remote.storage.enable</code> is set to true, the local log segments will be cleaned based on the values of <code>log.local.retention.bytes</code> and <code>log.local.retention.ms</code>. + <br> + Note that <code>cleanup.policy</code> supports empty values, which means infinite retention. Review Comment: Could we move this paragraph to above line 139? Note that <code>cleanup.policy</code> supports empty values => <code>cleanup.policy</code> now supports empty values -- 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