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

Try catch all exception in Knowhere to avoid threadpool crashes #804

Open
liliu-z opened this issue Aug 30, 2024 · 4 comments
Open

Try catch all exception in Knowhere to avoid threadpool crashes #804

liliu-z opened this issue Aug 30, 2024 · 4 comments
Assignees

Comments

@liliu-z
Copy link
Collaborator

liliu-z commented Aug 30, 2024

          Looks like we get many places didn't take care of the exception throwing like https://github.com/zilliztech/knowhere/blob/613f06f15597ff0abea79801c6995af5e2fb7713/src/common/comp/brute_force.cc#L136

We need to try catch is to avoid folly thread crash.

Originally posted by @liliu-z in #802 (comment)

@liliu-z
Copy link
Collaborator Author

liliu-z commented Aug 30, 2024

/assign @cydrain

@alexanderguzhva
Copy link
Collaborator

alexanderguzhva commented Aug 30, 2024

@liliu-z @cydrain I disagree. Such throws are in design of WaitAllSuccess() and ARE expected in case of unexpected situations, such as a program bug. What is needed is to make sure that all corner cases are handled, instead of masking them by using try\catch and having unreported problems in the code. Alternative, we may switch to using std::optional<> or std::expected<> data types

@liliu-z
Copy link
Collaborator Author

liliu-z commented Sep 2, 2024

@liliu-z @cydrain I disagree. Such throws are in design of WaitAllSuccess() and ARE expected in case of unexpected situations, such as a program bug. What is needed is to make sure that all corner cases are handled, instead of masking them by using try\catch and having unreported problems in the code. Alternative, we may switch to using std::optional<> or std::expected<> data types

@alexanderguzhva I didn't make myself clear. My point of view is try/catch and then use expected to get error code out.
There are two different kinds of error report methods, error code and exception. Knohwere adapts error code at beginning and I am trying to align all scenarios.

Copy link
Contributor

github-actions bot commented Oct 3, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.

@github-actions github-actions bot added the stale label Oct 3, 2024
@liliu-z liliu-z removed the stale label Oct 8, 2024
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

No branches or pull requests

3 participants