-
Notifications
You must be signed in to change notification settings - Fork 543
CXX-3100 Check return when acquiring client from pool #1205
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
Conversation
…xception in case of an exception.
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.
Thank you for the PR @Klizzardy.
Thank you for your suggestions. They really helped me understand mongocxx better. I've made all the changes you recommended, and the updated code has been committed. @kevinAlbs |
src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/error_code.hpp
Outdated
Show resolved
Hide resolved
Thanks for your patience. I have updated the code based on your suggestions. If there are any other issues, feel free to let me know. @kevinAlbs |
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.
LGTM with additional minor requested changes.
src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/error_code.cpp
Outdated
Show resolved
Hide resolved
src/mongocxx/lib/mongocxx/v_noabi/mongocxx/exception/error_code.cpp
Outdated
Show resolved
Hide resolved
…e.cpp Co-authored-by: Ezra Chung <[email protected]>
Co-authored-by: Ezra Chung <[email protected]>
Co-authored-by: Ezra Chung <[email protected]>
Co-authored-by: Ezra Chung <[email protected]>
All changes have been applied to the branch. If there are any other issues, please feel free to point them out. @kevinAlbs @eramongodb |
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.
Some formatting changes remaining; otherwise, LGTM.
src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/error_code.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Ezra Chung <[email protected]>
…_code.hpp Co-authored-by: Ezra Chung <[email protected]>
(This pull request fix one minor bug)
Symptom: When the uri parameter 'waitQueueTimeoutMS' was enabled and set to a smaller value (e.g. 100), the function 'mongoc_client_pool' may return a NULL client.
Solution: Add a check in the function 'pool::entry pool::acquire()', and throw an exception when correct client was not returned.