-
Notifications
You must be signed in to change notification settings - Fork 52
DOCSP-28558: connection pool faq + reuse client tip #636
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
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.
Nice work! Just a few suggestions and questions.
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
source/faq.txt
Outdated
When ``MongoClient.close()`` is called by any request, the driver | ||
closes all idle sockets and closes all sockets that are in | ||
use as they are returned to the pool. |
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.
I would expand this sentence just a bit because it captures an important detail:
"closes all sockets that are in use as they are returned to the pool." Meaning we won't interrupt in progress operations. This has a unique downside for Node.js users that their process won't exit if say a slowQuery find
is still pending results.
Related issue https://jira.mongodb.org/browse/NODE-3263
We have no clean solution yet because there is risk to an API that cancels operations client side without making clear the impacts (think: unacknowledged write, without actually asking for it to be unacknowledged). There is a future where client-side operation timeout may provide an avenue for users to put a global cap on operation time, so that would provide an avenue for pending operations to be closed at least on some kind of deadline.
TL;DR: I just think the "as returned" should be hoisted more in the phrasing b/c of its significance to our users.
* DOCSP-28558: connection pool + reuse client * first pass fixes * DB PR fixes 1 * small fixes * fixes * wording fix * capitalization (cherry picked from commit 9343c30)
* DOCSP-28558: connection pool + reuse client * first pass fixes * DB PR fixes 1 * small fixes * fixes * wording fix * capitalization (cherry picked from commit 9343c30)
* DOCSP-28558: connection pool + reuse client * first pass fixes * DB PR fixes 1 * small fixes * fixes * wording fix * capitalization (cherry picked from commit 9343c30)
* DOCSP-28558: connection pool + reuse client * first pass fixes * DB PR fixes 1 * small fixes * fixes * wording fix * capitalization (cherry picked from commit 9343c30)
Pull Request Info
PR Reviewing Guidelines
JIRA - DOCSP-28558
Staging - FAQ | Connection Guide
Self-Review Checklist