-
Notifications
You must be signed in to change notification settings - Fork 504
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 rate_limit.read to limit query rate #1158
Conversation
public static final ConfigOption<Integer> RATE_LIMIT_READ = | ||
new ConfigOption<>( | ||
"rate_limit.read", | ||
"The max rate(times/s) to execute query.", |
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.
execute query of vertices/edges.
Codecov Report
@@ Coverage Diff @@
## master #1158 +/- ##
============================================
- Coverage 65.35% 65.30% -0.05%
- Complexity 5632 5724 +92
============================================
Files 356 356
Lines 28874 29571 +697
Branches 4055 4170 +115
============================================
+ Hits 18870 19311 +441
- Misses 8118 8348 +230
- Partials 1886 1912 +26
Continue to review full report at Codecov.
|
Change-Id: I6d620270937e425b417cbaaedd1d67dfb058791f
1f8a36f
to
d281a79
Compare
// Do rate limit if needed | ||
RateLimiter rateLimiter = this.graph.readRateLimiter(); | ||
if (rateLimiter != null && query.resultType().isGraph()) { | ||
double time = rateLimiter.acquire(1); |
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.
what is the behavior if it is interrupted
Change-Id: I035515137dba4c9314bbf66fb7e4c13f79ab448b
Change-Id: I6d620270937e425b417cbaaedd1d67dfb058791f