jsancio commented on code in PR #12655:
URL: https://github.com/apache/kafka/pull/12655#discussion_r973503737
##########
core/src/main/scala/kafka/raft/KafkaMetadataLog.scala:
##########
@@ -556,15 +556,29 @@ object KafkaMetadataLog {
config: MetadataLogConfig
): KafkaMetadataLog = {
val props = new Properties()
- props.put(LogConfig.MaxMessageBytesProp,
config.maxBatchSizeInBytes.toString)
- props.put(LogConfig.SegmentBytesProp, Int.box(config.logSegmentBytes))
- props.put(LogConfig.SegmentMsProp, Long.box(config.logSegmentMillis))
- props.put(LogConfig.FileDeleteDelayMsProp,
Int.box(Defaults.FileDeleteDelayMs))
+ props.setProperty(LogConfig.MaxMessageBytesProp,
config.maxBatchSizeInBytes.toString)
+ props.setProperty(LogConfig.SegmentBytesProp,
config.logSegmentBytes.toString)
+ props.setProperty(LogConfig.SegmentMsProp,
config.logSegmentMillis.toString)
+ props.setProperty(LogConfig.FileDeleteDelayMsProp,
Defaults.FileDeleteDelayMs.toString)
+
+ // Disable time and byte retention when deleting segments
+ props.setProperty(LogConfig.RetentionMsProp, "-1")
+ props.setProperty(LogConfig.RetentionBytesProp, "-1")
Review Comment:
The long term solution is to also implement this feature documented in
KIP-630: https://issues.apache.org/jira/browse/KAFKA-14241
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]