-
Type:
Sub-task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
Use Case
As a... Node.js user
I want... the MongoClient to unblock on file operations (read/access) when I call .close
So that... there is not an indefinite hang on long file reads
User Experience
- When MongoClient.close() is called on a client that is in the process of reading a TLS file the file read is interrupted and an error is thrown
Dependencies
- None
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- The signal needs to be in the correct state when the client is: created, connected, closed.
- Is there an opportunity for better cross-driver alignment or testing in this area?
- Perhaps. Close isn't spec-ed, but maybe it could be, MongoClient's aren't spec-ed either.
- Is there an opportunity to improve existing documentation on this subject?
- No
Acceptance Criteria
Implementation Requirements
- Add close signal to MongoClient and connect it to file operations
- reset the signal on reconnect
Testing Requirements
- Unskip the file read close tests
- Consider, unit testing signal state changes
Documentation Requirements
- None
Follow Up Requirements
- Add more use of the close signal