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

private generic command function that supports writeConcern

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: libmongoc
    • None
    • Fully Compatible

      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.

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

              Created:
              Updated:
              Resolved: