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

Roll segments early under disk pressure, for topics with retention settings #6431

Open
jcsp opened this issue Sep 16, 2022 · 0 comments
Open
Labels
area/storage kind/enhance New feature or request

Comments

@jcsp
Copy link
Contributor

jcsp commented Sep 16, 2022

Problem

Consider a topic with 100 partitions, retention.bytes set to 100MB, the default 1GB segment size limit, and a 50GB drive.

We would have to write 100GB of data (well beyond the drive capacity) before any segments roll, and retention rules are only applied to sealed segments.

The result is that we would hit our threshold for disk-nearly-full and start blocking writes.

Solution

When applying retention rules to a topic, we should notice if the system is under disk pressure, and if we have an opportunity to free some space by applying retention rules, then prompt the log to roll now, even if it has not yet reached the configured segment.bytes.

Impact

Users who have configured appropriate retention.bytes settings for their partition count will no longer run the risk of filling up their disk.

JIRA Link: CORE-1019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage kind/enhance New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant