feat(api): add http/grpc interface rate limit#5502
Merged
xxo1shine merged 2 commits intotronprotocol:release_v4.7.3from Sep 20, 2023
Merged
feat(api): add http/grpc interface rate limit#5502xxo1shine merged 2 commits intotronprotocol:release_v4.7.3from
xxo1shine merged 2 commits intotronprotocol:release_v4.7.3from
Conversation
317787106
reviewed
Sep 19, 2023
| } else { | ||
| constructor = c.getConstructor(); | ||
| obj = constructor.newInstance(); | ||
| obj = constructor.newInstance("qps=" + QPS); |
There was a problem hiding this comment.
this "qps" and later should use STRATEGY_PARAM_QPS in QpsStrategy
ed01b09 to
4f9b768
Compare
| } else { | ||
| constructor = c.getConstructor(); | ||
| obj = constructor.newInstance(); | ||
| obj = constructor.newInstance(QpsStrategy.DEFAULT_QPS_PARAM); |
Contributor
There was a problem hiding this comment.
Why change the default initial logic?
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## release_v4.7.3 #5502 +/- ##
====================================================
+ Coverage 64.90% 65.00% +0.09%
- Complexity 10001 10018 +17
====================================================
Files 894 894
Lines 53799 53806 +7
Branches 5920 5921 +1
====================================================
+ Hits 34920 34978 +58
+ Misses 16168 16117 -51
Partials 2711 2711
... and 13 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
jwrct
approved these changes
Sep 19, 2023
317787106
approved these changes
Sep 20, 2023
| container.add(KEY_PREFIX_HTTP, getClass().getSimpleName(), (IRateLimiter) obj); | ||
|
|
||
| } else { | ||
| constructor = c.getConstructor(); |
Contributor
There was a problem hiding this comment.
constructor = c.getConstructor(String.class)?
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
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?
add http/grpc interface rate limit, refer to issue #5390
Why are these changes required?
This PR has been tested by:
Follow up
Extra details