-
Notifications
You must be signed in to change notification settings - Fork 724
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
Support to set store limit in auto or manual mode #1887
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1887 +/- ##
==========================================
- Coverage 77.43% 77.39% -0.04%
==========================================
Files 177 178 +1
Lines 18120 18142 +22
==========================================
+ Hits 14031 14041 +10
- Misses 3006 3016 +10
- Partials 1083 1085 +2
Continue to review full report at Codecov.
|
4835cf9
to
b5a2898
Compare
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.
LGTM. But why do we need to set different mode?
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
The store limit is wrapped by a struct called StoreLimit, it exports the useful api of the ratelimit.Bucket. It records the limit's setting mode which can be "auto" or "manual". An "manual" set value can overwrite an "auto set value, otherwise it is forbidden. Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
b5a2898
to
aaa70d9
Compare
Signed-off-by: Shafreeck Sea <shafreeck@gmail.com>
@lhy1024 The store limit value set by PD maybe not the desired value wanted by the user in which case the user prefers to overwrite the value manually. A value set by the user should not be overwritten by PD. |
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.
the rest LGTM
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.
The rest LGTM
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.
LGTM
@rleungx Would you mind to approve this PR if there are no more questions? |
/run-all-tests |
@shafreeck merge failed. |
ci failed @shafreeck |
What problem does this PR solve?
Support to set store limit in auto or manual mode, it is useful when we introduce the feature to tune store limits automatically.
What is changed and how it works?
StoreLimit
structCheck List
Tests
Code changes
Related changes