-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 kvstore rate limiter #2557
Add kvstore rate limiter #2557
Conversation
bb176da
to
0ed0962
Compare
} | ||
|
||
void consume(GraphSpaceID spaceId, PartitionID partId, size_t toConsume) { | ||
DCHECK(buckets_.find({spaceId, partId}) != buckets_.end()); |
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 it redundant?
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.
Yeah, just to prevent misuse.
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.
Doesn't it need to be locked here?
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.
There won't be concurrent add/remove/consume of a {spaceId, partId}. Caller must make sure part has been added, and won't remove during consume. I'll add some comments.
Good job , 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.
Good job!
2f9dd3e
* get meta version in hb * cherry-pick vesoft-inc#549 vesoft-inc#550 vesoft-inc#551 * damn timeout * fix rebuild index bug introduced in vesoft-inc#2557 Co-authored-by: Doodle <[email protected]>
Add a simple rate limiter, there are mainly two major cases: