Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-809

Improve testing around default writeConcern

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None

    Description

      The existing tests for writeConcern imply that an empty document is a valid writeConcern to send to the server.

      https://github.com/mongodb/specifications/blob/master/source/read-write-concern/tests/document/write-concern.json#L3-L10

      In fact, the default writeConcern is no writeConcern (i.e. don't send the writeConcern field at all). This has come up in the past related to drivers accidentally overriding getLastErrorDefaults. It is coming up again in relation to PM-900.

      There have been two bugs filed and fixed in drivers related to this - CDRIVER-2273 and PYTHON-1523. Other drivers may have the same bug, since our existing tests don't catch it.

      Please add tests to ensure that drivers don't add the writeConcern option with an empty document to write commands when the application has not specified a write concern.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kevin.albertson@mongodb.com Kevin Albertson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: