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

Advise users not to use executeWriteCommand for insert, update, and delete

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.4.0
    • Component/s: Docs
    • Labels:
      None

      In mongodb/mongo-php-driver#967, a user noted that libmongoc 1.9.4 silently ignores the writeConcern option that PHPC 1.4.4 may send to mongoc_client_write_command_with_opts() for commands other than findAndModify. In libmongoc 1.10, 5c88fde for CDRIVER-2214 added logic to raise an error if a writeConcern option was specified for alternative write commands and the server's wire version was < 5. This ignores the fact that the insert, update, and delete commands have historically supported a writeConcern option since they were introduced in wire version 2 (see: wireversion-featurelist.rst).

      libmongoc does not intend for mongoc_client_write_command_with_opts() to be used for insert, update, and delete commands and mentions this in its documentation. We should do the same.

            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: