Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-426

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

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.0-beta2
    • Affects Version/s: 1.0.0-beta1
    • Component/s: 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:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: