Skip to content

Conversation

@ajbeamon
Copy link
Contributor

No description provided.

@ajbeamon
Copy link
Contributor Author

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.
@ajbeamon
Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor

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.

@ajbeamon
Copy link
Contributor Author

@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.
@ajbeamon
Copy link
Contributor Author

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.

@etschannen etschannen merged commit dcbb198 into apple:release-6.2 Aug 30, 2019
@ajbeamon ajbeamon deleted the fix-proxy-grv-budgeting branch October 31, 2019 18:07
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.

3 participants