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

Improve testing around default writeConcern

    • Type: Icon: Epic Epic
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • None
    • Not Needed
    • To Do
    • Improve testing around default writeConcern
    • 100
    • Not Needed
    • Hide

      This feature has been asked for quite some time by Cloud, so tagging that team. Docs, because it will have to be documented.

      Show
      This feature has been asked for quite some time by Cloud, so tagging that team. Docs, because it will have to be documented.

      Epic Summary

      Summary

      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.

      Lead : Jeremy
      Author : Kevin
      POCs : C - Kevin

      Spec test change

      SPEC-1352 introduces a new spec test format for the read/write concern tests, mostly equivalent to existing transactions/CRUD spec tests, to verify that write operations do not include a default write concern:

            Assignee:
            Unassigned Unassigned
            Reporter:
            rathi.gnanasekaran Rathi Gnanasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: