From 1ccaddaa701cd34d8871cfce12e3edfed9781dc3 Mon Sep 17 00:00:00 2001 From: ShihYuan Lin Date: Fri, 9 May 2025 09:48:55 +0800 Subject: [PATCH] KAFKA-19209: Clarify index.interval.bytes impact on offset and time index (#19657) Update docs to note index.interval.bytes sets entry frequency for offset index and, conditionally, time index. Improve clarity and readability of index.interval.bytes description. Reviewers: Luke Chen --- .../org/apache/kafka/common/config/TopicConfig.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java index ec3721389a4..3fcea1968b8 100755 --- a/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java +++ b/clients/src/main/java/org/apache/kafka/common/config/TopicConfig.java @@ -111,10 +111,12 @@ public class TopicConfig { "The largest record batch size allowed by Kafka (after compression if compression is enabled)."; public static final String INDEX_INTERVAL_BYTES_CONFIG = "index.interval.bytes"; - public static final String INDEX_INTERVAL_BYTES_DOC = "This setting controls how frequently " + - "Kafka adds an index entry to its offset index. The default setting ensures that we index a " + - "message roughly every 4096 bytes. More indexing allows reads to jump closer to the exact " + - "position in the log but makes the index larger. You probably don't need to change this."; + public static final String INDEX_INTERVAL_BYTES_DOC = "This setting controls how frequently Kafka " + + "adds entries to its offset index and, conditionally, to its time index. " + + "The default setting ensures that we index a message roughly every 4096 bytes. " + + "More frequent indexing allows reads to jump closer to the exact position in the log " + + "but results in larger index files. You probably don't need to change this." + + "

Note: the time index will be inserted only when the timestamp is greater than the last indexed timestamp.

"; public static final String FILE_DELETE_DELAY_MS_CONFIG = "file.delete.delay.ms"; public static final String FILE_DELETE_DELAY_MS_DOC = "The time to wait before deleting a file from the " +