Skip to content

Commit

Permalink
perf(kraft): decrease the index interval bytes of KRaft Log from 1MB …
Browse files Browse the repository at this point in the history
…to 4KB (#2078)

Signed-off-by: Ning Yu <[email protected]>
  • Loading branch information
Chillax-0v0 authored Oct 16, 2024
1 parent 724dd2b commit 794f995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/main/scala/kafka/raft/KafkaMetadataLog.scala
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@ object KafkaMetadataLog extends Logging {
// Disable time and byte retention when deleting segments
props.setProperty(TopicConfig.RETENTION_MS_CONFIG, "-1")
props.setProperty(TopicConfig.RETENTION_BYTES_CONFIG, "-1")
// AutoMQ for Kafka inject start
// Override the index interval bytes to 4KB, which is the default value in Apache Kafka.
props.setProperty(TopicConfig.INDEX_INTERVAL_BYTES_CONFIG, "4096")
// AutoMQ for Kafka inject end
LogConfig.validate(props)
val defaultLogConfig = new LogConfig(props)

Expand Down

0 comments on commit 794f995

Please sign in to comment.