Skip to content
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

Add LiMinSegmentRollMs to prevent log roll to be so fast #521

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

CCisGG
Copy link

@CCisGG CCisGG commented Sep 4, 2024

LI_BUGS = [https://jira01.corp.linkedin.com:8443/browse/LIKAFKA-60375]

Description

Today, the log roll time can be very short if maxCompactionLagMs and logRollTimeJitterMillis are not set properly. E.g. if logRollTimeJitterMillis is larger than maxCompactionLagMs, the log roll time can be as short as 0 millisecond so that new segments are rolling out on every new message. This will cause too many open file handles error and crash the process.

This fix adds a min interval between segments rollout, and the interval will be able to configured at server side via config LiMinSegmentRollMs. In this PR, we set the default value to be 15 minutes, so that no new segments can be rollout within 15 minutes.

@CCisGG CCisGG requested a review from groelofs September 4, 2024 18:16
Copy link

@groelofs groelofs left a comment

Choose a reason for hiding this comment

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

One wording nit on the help text, but looks great--many thanks for this safety check!

core/src/main/scala/kafka/server/KafkaConfig.scala Outdated Show resolved Hide resolved
@CCisGG CCisGG merged commit e6b20e6 into 3.0-li Sep 4, 2024
25 checks passed
@CCisGG CCisGG deleted the 20240904_add_min_rollout_config branch September 4, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants