Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-6377

Remove noResponse option

    • 2
    • Hide

      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.

      Show
      Create a copy of the Kickoff Template with the issue key (NODE-XXX) in the filename and share a link to the new doc via this field.
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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

            Assignee:
            aditi.khare@mongodb.com Aditi Khare
            Reporter:
            aditi.khare@mongodb.com Aditi Khare
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: