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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor - P4
    • 1.10.0
    • Affects Version/s: 1.7.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: