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

handle the bad alloc exception in vector search #21

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

wxyucs
Copy link
Collaborator

@wxyucs wxyucs commented Sep 6, 2024

No description provided.

@wxyucs wxyucs force-pushed the handlering_bad_alloc_exception branch from 82be33e to 84987d6 Compare September 6, 2024 06:18
@LHT129 LHT129 self-requested a review September 6, 2024 06:24
Copy link
Collaborator

@LHT129 LHT129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -70,7 +72,7 @@ HNSW::HNSW(std::shared_ptr<hnswlib::SpaceInterface> space_interface,
if (not allocator) {
allocator = DefaultAllocator::Instance();
}
allocator_ = allocator;
allocator_ = new SafeAllocator(allocator);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SafeAllocator need free ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, release at deconstruct function

Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com>
@wxyucs wxyucs force-pushed the handlering_bad_alloc_exception branch from 84987d6 to 598dd60 Compare September 6, 2024 06:54
Copy link
Collaborator

@jiaweizone jiaweizone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wxyucs wxyucs merged commit 689fd51 into main Sep 6, 2024
3 checks passed
@wxyucs wxyucs deleted the handlering_bad_alloc_exception branch September 6, 2024 07:21
@wxyucs wxyucs changed the title handler the bad alloc exception in vector search handle the bad alloc exception in vector search Sep 6, 2024
wxyucs added a commit that referenced this pull request Sep 11, 2024
Signed-off-by: Xiangyu Wang <wxy407827@antgroup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants