Skip to content

KAFKA-19151: docs: clarify that flush.ms requires log.flush.scheduler.interval.ms config #19479

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ public class TopicConfig {
public static final String FLUSH_MS_CONFIG = "flush.ms";
public static final String FLUSH_MS_DOC = "This setting allows specifying a time interval at which we will " +
"force an fsync of data written to the log. For example if this was set to 1000 " +
"we would fsync after 1000 ms had passed. In general we recommend you not set " +
"this and use replication for durability and allow the operating system's background " +
"we would fsync after 1000 ms had passed. Note that this setting depends on the broker-level " +
"configuration \"log.flush.scheduler.interval.ms\", which controls how frequently the flush check occurs. " +
"If \"log.flush.scheduler.interval.ms\" is not configured, the topic config \"flush.ms\" will not be triggered. " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use <code></code> instead, so we can have code block for configuration.

Example:
Screenshot 2025-04-16 at 10 17 55 AM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"If "log.flush.scheduler.interval.ms" is not configured, the topic config "flush.ms" will not be triggered. "

Maybe we can remove this as the remaining docs is good enough

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also use the LOG_FLUSH_SCHEDULER_INTERVAL_MS_CONFIG and FLUSH_MS_CONFIG constants instead of hardcoding the strings.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m1a2st The LOG_FLUSH_SCHEDULER_INTERVAL_MS_CONFIG is in org.apache.kafka.server.config.ServerLogConfigs. It already imported TopicConfig. I don't think we can import the ServerLogConfigs configuration in TopicConfig.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LOG_FLUSH_SCHEDULER_INTERVAL_MS_CONFIG is in org.apache.kafka.server.config.ServerLogConfigs

Thanks, but FLUSH_MS_CONFIG can update.

"In general we recommend you not set this and use replication for durability and allow the operating system's background " +
"flush capabilities as it is more efficient.";

public static final String RETENTION_BYTES_CONFIG = "retention.bytes";
Expand Down