You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/10/15 16:55:16 UTC

[GitHub] [samza] prateekm commented on a change in pull request #1190: SAMZA-2352: Use min.compaction.lag.ms to avoid compacting the Kafka changelog topic

prateekm commented on a change in pull request #1190: SAMZA-2352: Use min.compaction.lag.ms to avoid compacting the Kafka changelog topic
URL: https://github.com/apache/samza/pull/1190#discussion_r335066735
 
 

 ##########
 File path: samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
 ##########
 @@ -338,6 +340,15 @@ class KafkaConfig(config: Config) extends ScalaMapConfig(config) {
 
     kafkaChangeLogProperties.setProperty("segment.bytes", KafkaConfig.CHANGELOG_DEFAULT_SEGMENT_SIZE)
     kafkaChangeLogProperties.setProperty("delete.retention.ms", String.valueOf(new StorageConfig(config).getChangeLogDeleteRetentionInMs(name)))
+
+    // To enable transactional state, we will need to avoid the head of the changelog
+    // (the messages after last checkpoint) being log-compacted so we can trim the rest of the updates.
+    // We use min.compaction.log.ms to control the compaction time.
+    if (new TaskConfig(this).getTransactionalStateRestoreEnabled) {
+      kafkaChangeLogProperties.setProperty("min.compaction.lag.ms",
 
 Review comment:
   Nitpick: extract constant for config key.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services