Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-709

FindAndModify::isAcknowledgedWriteConcern() fails to detect some acknowledged write concerns

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.10.0
    • Affects Version/s: 1.7.0
    • Component/s: None
    • None

      In ee91ccf for PHPLIB-539, an internal isAcknowledgedWriteConcern method was introduced to support error reporting for using a hint option with a FindAndModify operation (e.g. FindOneAndUpdate). That function currently requires a w value greater than 1 or a true j value, but fails to consider w=1 or a string value (e.g. "majority"). A string value will likely satisfy the comparison check, but it'd be preferable to explicitly handle strings here.

      This came up while working on DRIVERS-1340, which will entail porting the isAcknowledgedWriteConcern to the Update, Delete, and BulkWrite operations.

            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: