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

Using MONGOC_WRITE_CONCERN_W_ERRORS_IGNORED may send invalid "w" value to the server

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: libmongoc
    • None

      I believe this dates back to 859bc9b from CDRIVER-769. Therein, _mongoc_write_concern_freeze was changed to always append w to the BSON representation (provided it was not a tag string or "majority").

      MONGOC_WRITE_CONCERN_W_ERRORS_IGNORED was deprecated in CDRIVER-628 and is currently documented as a synonym for MONGOC_WRITE_CONCERN_W_UNACKNOWLEDGED. In that case, I think it should serialize as zero in BSON instead of its raw value (-1).

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: