-
Notifications
You must be signed in to change notification settings - Fork 12
Add flush_every_n_blocks config option to BufWriter generators #1683
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
TheSafo
wants to merge
1
commit into
jsaf/block-based-limiter
Choose a base branch
from
jsaf/flush-every-n
base: jsaf/block-based-limiter
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+71
−8
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Jan 6, 2026
a2c8d36 to
0e90fb1
Compare
0e90fb1 to
b69f29c
Compare
9ae8ce6 to
648642c
Compare
648642c to
a636e4c
Compare
b69f29c to
403c48a
Compare
403c48a to
e13d903
Compare
a636e4c to
661d654
Compare
e13d903 to
a62c9fd
Compare
867b097 to
e1d8abc
Compare
a62c9fd to
8180361
Compare
e1d8abc to
e73bb21
Compare
8180361 to
899bfeb
Compare
886980b to
8071239
Compare
Draft
e73bb21 to
57bce08
Compare
8071239 to
ff8a57f
Compare
57bce08 to
a47d241
Compare
ff8a57f to
1be6e74
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Adds flush_every_n_blocks to traditional and logrotate generators. This is designed to be used in conjunction with block-based throttling to ensure that blocks are still flushed regularly.
Motivation
BufWriter generally only writes out to disk once its capacity is full (or on log rotate). For standard usage of lading, this works fine since the capacity is set at the maximum throttler capacity (in bytes), which lading trires its best to run at, so it flushes ~every second. However, for block-based throttling (and varying block sizes) it's less likely that 1 second of blocks fills the maximum possible bytes capacity for those blocks (blocks per second times max block size), so having a config option to manually flush every few blocks ensures regular flush intervals.
Related issues
Follow up of #1675