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

private generic command function that supports writeConcern

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: libmongoc
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible

      Description

      The following functions have been implemented in CDRIVER-1322:

      mongoc_collection_drop_with_write_concern
      mongoc_database_drop_with_write_concern
      mongoc_collection_drop_index_with_write_concern
      mongoc_database_create_collection_with_write_concern

      When max_wire_version >=5, these functions need to return false (or some other indication of failure) on writeConcernError and parse the error.

      Create a new function: _mongoc_client_command_with_write_concern. Its code is just like mongoc_client_command_simple, except that, just before it calls _mongoc_client_command_with_stream:

      if (server_stream->sd->max_wire_version >= WIRE_VERSION_CMD_WRITE_CONCERN &&
          write_concern &&
          !_mongoc_write_concern_is_default (write_concern))
      

      ...then it copies the command and appends the write concern to it.

      Call this new private function from all the "_with_write_concern" public functions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              fiona.rowan Fiona Rowan
              Reporter:
              fiona.rowan Fiona Rowan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: