[
https://issues.apache.org/jira/browse/KAFKA-17360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874802#comment-17874802
]
Chia-Ping Tsai commented on KAFKA-17360:
----------------------------------------
discussed with [~showuon] and [~brandboat] offline. this jira should fix
following issues:
1. the inconsistent "remote" flag [0][1]. we should use
`remoteLogEnabledAndRemoteCopyEnabled()`
2. `-2` needs to be replaced by server-side config. [2]
Noted that `localRetentionMs` has similar issue.
[0]
https://github.com/apache/kafka/blob/5f02ef952e500fda5272609cec90fe1eb30da6fa/core/src/main/scala/kafka/log/UnifiedLog.scala#L1591
[1]
https://github.com/apache/kafka/blob/5f02ef952e500fda5272609cec90fe1eb30da6fa/core/src/main/scala/kafka/log/UnifiedLog.scala#L1604
[2]
https://github.com/apache/kafka/blob/5f02ef952e500fda5272609cec90fe1eb30da6fa/core/src/main/scala/kafka/log/UnifiedLog.scala#L2358
> Improve log message when log retention ms/bytes is -2
> -----------------------------------------------------
>
> Key: KAFKA-17360
> URL: https://issues.apache.org/jira/browse/KAFKA-17360
> Project: Kafka
> Issue Type: Improvement
> Reporter: Luke Chen
> Priority: Major
>
> When setting retention.ms/bytes to -2, we can notice this log message:
> {code:java}
> Deleting segment LogSegment(baseOffset=10045, size=1037087,
> lastModifiedTime=1724040653922, largestRecordTimestamp=1724040653835) due to
> local log retention size -2 breach. Local log size after deletion will be
> 13435280. (kafka.log.UnifiedLog) [kafka-scheduler-6]{code}
> This is not helpful for users. We should replace -2 with real retention value
> when logging.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)