WriteConcern constructor should throw for invalid $w and $wtimeout values

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 1.0.0-beta2
    • Affects Version/s: 1.0.0-beta1
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      mongoc_write_concern_set_w() requires the argument to be >= -3 or it is a NOP. We should raise an exception if $w is an integer < -3.

      Additionally, should we raise an exception if the $wtimeout argument is < 0. Currently, libmongoc doesn't check for this and allows a negative timeout to be set, which may be an oversight. Per the documentation, wtimeout should be >= 0.

              Assignee:
              Jeremy Mikola
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: