-
Notifications
You must be signed in to change notification settings - Fork 24
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 Graph Interface #62
Conversation
Signed-off-by: LHT129 <tianlan.lht@antgroup.com>
9cc3f72
to
d81a715
Compare
virtual void | ||
IncreaseTotalCount(uint64_t count) { | ||
std::unique_lock<std::mutex> lock(global_); | ||
total_count_ += count; |
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.
Can we use atomic increment 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.
now use lock in external Index, we will apply atomic in the datacell layer or add concurrent interface in future
|
||
virtual void | ||
SetMaxCapacity(uint64_t capacity) { | ||
this->max_capacity_ = std::max(capacity, this->total_count_); |
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.
max_capacity_
equals total_count_
?
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.
max_capacity_ >= total_count_, equal is allowed
issue: #40