Skip to content

Commit 794f995

Browse files
authored
perf(kraft): decrease the index interval bytes of KRaft Log from 1MB to 4KB (#2078)
Signed-off-by: Ning Yu <[email protected]>
1 parent 724dd2b commit 794f995

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/src/main/scala/kafka/raft/KafkaMetadataLog.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,10 @@ object KafkaMetadataLog extends Logging {
569569
// Disable time and byte retention when deleting segments
570570
props.setProperty(TopicConfig.RETENTION_MS_CONFIG, "-1")
571571
props.setProperty(TopicConfig.RETENTION_BYTES_CONFIG, "-1")
572+
// AutoMQ for Kafka inject start
573+
// Override the index interval bytes to 4KB, which is the default value in Apache Kafka.
574+
props.setProperty(TopicConfig.INDEX_INTERVAL_BYTES_CONFIG, "4096")
575+
// AutoMQ for Kafka inject end
572576
LogConfig.validate(props)
573577
val defaultLogConfig = new LogConfig(props)
574578

0 commit comments

Comments
 (0)