-
Type: Task
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Connection Layer, Performance
Currently, the Node driver uses a buggy `noResponse` option in certain admin operations and in client.close(). This option is also made public to users, but can be removed in a minor version.
Through technical discussion, it was decided that it is a correctness fix / likely a nearly unused option that it is not a large breaking change.
Use Case
When the noResponse option is set to true on a command, the command does not change any thing on the document sent to the server, does not wait for the server response, and the socket is in the incorrect state after the command. This leads to buggy behavior. For example, if a find with noResponse = true is run, and then an insert is run, the insert command's response document will be from the find.
As a... user
I want... to be able to run unacknowledged writes in admin operations or client.close
So that... _the server does not do any extra work and the socket is in the correct state after the command.
Acceptance Criteria
Implementation Requirements
- remove noResponse from codebase, and urge users to use writeConcern.w = 0 instead
Testing Requirements
- all existing tests pass
- add client.close and runAdminCommand to writeConcern w = 0 write operation tests
Documentation Requirements
- n/a
Follow Up Requirements
- n/a
- has to be done after
-
NODE-6060 Set fire-and-forget bit when writeConcern is w: 0
- Closed