-
Notifications
You must be signed in to change notification settings - Fork 1.5k
The master proxy was too slow to erase a GRV budget deficit if no GRV requests were coming in. #1999
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
The master proxy was too slow to erase a GRV budget deficit if no GRV requests were coming in. #1999
Conversation
|
I'm adding some additional logic to clamp the budget deficit to this PR, that should be coming shortly. |
…ds of transactions. Decay the deficit if the rate changes and it exceeds the new limit.
|
I've added the new logic. The knob values were chosen somewhat arbitrarily, so let me know if you think they should change. |
# Conflicts: # documentation/sphinx/source/release-notes.rst
| void reset(double elapsed) { | ||
| limit = std::min(0.0,limit) + std::min(rate * elapsed, SERVER_KNOBS->START_TRANSACTION_MAX_TRANSACTIONS_TO_START); | ||
| limit = std::min(0.0, limit) + rate * elapsed; // Adjust the limit based on the full elapsed interval in order to properly erase a deficit | ||
| limit = std::min(limit, rate * SERVER_KNOBS->START_TRANSACTION_BATCH_INTERVAL_MAX); // Don't allow the rate to exceed what would be allowed in the maximum batch interval |
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 this necessary? It seems like elapsed will not be larger than SERVER_KNOBS->START_TRANSACTION_BATCH_INTERVAL_MAX and thus std::min(0.0, limit) + rate * elapsed will always be a value smaller or equal to rate * SERVER_KNOBS->START_TRANSACTION_BATCH_INTERVAL_MAX.
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.
Oh never mind, I didn't see the change below.
|
@fdb-build test CTest please |
…of seconds of transactions. Decay the deficit if the rate changes and it exceeds the new limit." This reverts commit 90cb73d.
|
I've reverted the code that clamps the deficit for now because I think there are some flaws both with the current approach and the new one I had implemented. My intent is to try to address those in a future PR. |
No description provided.