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

Set fire-and-forget bit when writeConcern is w: 0

    • 5
    • 0
    • Not Needed
    • 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?

      Use Case

      As a write concern 0 user
      I want the driver to set the fire-and-forget bit
      So that the server handles the unacknowledged write as expected

      See spec:
      https://github.com/mongodb/specifications/blob/master/source/message/OP_MSG.rst#moretocome-on-requests

      User Impact

      • Has the potential to change the outcome of writes, operations that once would fail could now succeed.

      Dependencies

      • None

      Acceptance Criteria

      Implementation Requirements

      • If the command being run has a writeConcern w setting of 0
        • set the moreToCome bit on the outgoing OP_MSG message.
        • return the command without waiting for a server response

      Testing Requirements

      • Integration:
        • ensure if writeConcern w = 0 on the command,
          • moreToCome bit is set in outgoing request
          • commandSucceededEvent's reply only contain { ok: 1 }
      • Unit:
        • ensure if writeConcern w = 0 on the command, moreToCome is set in OP_MSG

      Documentation Requirements

      • Update TSDoc over "w" settings to mention the side-effect of setting w:0 on the protocol message.

      Follow Up Requirements

      • None

            Assignee:
            aditi.khare@mongodb.com Aditi Khare
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: