Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2782

Fake an {ok: 1} reply for unacknowledged writes with OP_MSG

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: None
    • Labels:
      None

      Description

      While working on implementing the command monitoring spec tests in C++, Spencer Mckenney found one test that was failing: unacknowledgedBulkWrite.json It fails because the reply in the command succeeded event is an empty document, but the spec tests expect a reply of ok:1. According to the spec:

      For server versions that do not support write commands, the driver MUST treat an acknowledged write as a single command event, where the GLE command is ignored as a started event and the response to the GLE is treated as the reply in the CommandSucceededEvent. Unacknowledged writes must provide a CommandSucceededEvent with a ok:1 reply.

      IIUC this is saying we should always generate an ok:1 reply. But the path for OP_MSG writes doesn't. Instead we fake the ok:1 in our tests.

      I think we should actually generate the fake ok:1 for unacknowledged OP_MSG writes. From what I've looked at, it's a straightforward fix.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevin.albertson Kevin Albertson
              Reporter:
              kevin.albertson Kevin Albertson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: