-
Notifications
You must be signed in to change notification settings - Fork 49
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
DOCSP-40094: Clarify MongoClient.close() behavior #898
DOCSP-40094: Clarify MongoClient.close() behavior #898
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.
left a blocking change/suggestion
source/faq.txt
Outdated
@@ -106,6 +106,12 @@ closes only inactive sockets, so you cannot interrupt or terminate | |||
any ongoing operations by using this method. The driver closes these | |||
sockets only when the process completes. | |||
|
|||
.. note:: |
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.
S: I think you should clip the last few sentences from the preceding paragraph and combine them into this note. Right now, the paragraph says
Calling MongoClient.close() closes only inactive sockets, so you cannot interrupt or terminate any ongoing operations by using this method. The driver closes these sockets only when the process completes.
But then this note contradicts that point. Maybe the combined content could express the following points:
- Calling MongoClient.close() closes only inactive sockets
- It also closes existing sessions and txns
- So, even though you might not impact operations by closing a socket, you might impact an operation occurring in a transaction
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.
approving with some final wording suggestions!
source/faq.txt
Outdated
closes only inactive sockets, so you cannot interrupt or terminate | ||
any ongoing operations by using this method. The driver closes these | ||
sockets only when the process completes. | ||
closes only inactive sockets and does not actively terminate |
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.
closes only inactive sockets and does not actively terminate | |
closes only inactive sockets and does not directly terminate |
source/faq.txt
Outdated
any ongoing operations. The driver closes in-use sockets only when | ||
the operation completes. However, the ``MongoClient.close()`` method |
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.
any ongoing operations. The driver closes in-use sockets only when | |
the operation completes. However, the ``MongoClient.close()`` method | |
any ongoing operations. The driver closes any in-use sockets only when | |
the associated operations complete. However, the ``MongoClient.close()`` method |
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2 (cherry picked from commit b9bccea)
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2 (cherry picked from commit b9bccea)
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2 (cherry picked from commit b9bccea)
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2 (cherry picked from commit b9bccea)
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2 (cherry picked from commit b9bccea)
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2 (cherry picked from commit b9bccea)
* DOCSP-40094: Clarify MongoClient.close() behavior * RR feedback * RR feedback 2 (cherry picked from commit b9bccea)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-40094
Staging - https://preview-mongodbnorareidy.gatsbyjs.io/node/DOCSP-40094-close-behavior/faq/#how-does-connection-pooling-work-in-the-node-driver-
Self-Review Checklist