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

Prohibit writeConcern values less than -1

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.10.0
    • Affects Version/s: None
    • Component/s: libmongoc, uri
    • None
    • Minor Change

      We use writeConcern values of "w" -2 through -4 to express special internal meanings. By accident, we also allow these values in URIs like:

      mongodb://host/?w=-4

      and also in BSON documents passed as "opts":

      bson_t *opts;
      
      opts = BCON_NEW ("writeConcern", "{", "w", BCON_INT32 (-4), "}");
      mongoc_collection_insert_one (collection, document, opts);
      

      In 1.10, we'll prohibit "w" values less than -1.

      "w=-1" is still allowed as a deprecated alias for "w=0" (CDRIVER-628).

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: