Skip to content
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

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Add Graph Interface #62

merged 1 commit into from
Oct 15, 2024

Conversation

LHT129
Copy link
Collaborator

@LHT129 LHT129 commented Oct 11, 2024

issue: #40

@LHT129 LHT129 added the kind/feature New feature or request label Oct 11, 2024
Signed-off-by: LHT129 <tianlan.lht@antgroup.com>
virtual void
IncreaseTotalCount(uint64_t count) {
std::unique_lock<std::mutex> lock(global_);
total_count_ += count;
Copy link
Collaborator

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?

Copy link
Collaborator Author

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_);
Copy link
Collaborator

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_ ?

Copy link
Collaborator Author

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

@LHT129 LHT129 merged commit 5e94030 into main Oct 15, 2024
2 checks passed
@LHT129 LHT129 deleted the graph_interface branch October 15, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants