Remove noResponse option

XMLWordPrintableJSON

    • 2
    • None
    • 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
    • None
    • None
    • None
    • None
    • None
    • None

      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:
            Bailey Pearson
            Reporter:
            Aditi Khare (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: