-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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 burst mode for congestion control #20631
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
let absolute_limit = self | ||
.max_accumulated_txn_cost_per_object_in_commit | ||
.saturating_add(self.max_txn_cost_overage_per_object_in_commit); | ||
if start_cost <= burst_limit && end_cost <= absolute_limit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the check on line 166 superfluous now? it seems like the only time the end cost is relevant is when checking the absolute limit.
This also fits with what we discussed, where we split the constants into the debt ceiling and the payback rate. The per commit constant doesn't seem to be needed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, removed the superfluous check
/// If >0, congestion control will allow transactions in total cost equaling the | ||
/// configured amount to exceed the configured maximum accumulated cost per object. | ||
/// As above, up to one transaction per object exceeding the burst limit will be allowed. | ||
allowed_txn_cost_overage_burst_per_object_in_commit: Option<u64>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when we discussed this last, we seemed to have settled on the mental model that the two params could be thought of as "the rate at which scheduling debt is paid down" and "the debt ceiling"
i think this model is much clearer, because i'm having trouble understanding your comments above even though I at least think I understand the system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's slightly complicated by the requirement to maintain prior behavior when the new param is not set
max_accumulated_txn_cost_per_object_in_commit
- is always the rate at which debt is paid down
- also the absolute limit, if it's the only thing set
max_txn_cost_overage_per_object_in_commit
if set with 1,
- soft debt ceiling is 1
- absolute limit is 1+2
(this is how it is currently configured to work, with 2 == u64 max)
allowed_txn_cost_overage_burst_per_object_in_commit
if set with 1 and 2 (must be <= 2 per assert)
- soft debt ceiling is 1+3
- absolute limit is still 1+2
Description
Burst mode allows budget to be exceeded up to the configured burst limit.
Test plan
added/updated unit tests
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.