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

Test read and write concern inheritance

      _mongoc_write_command_execute() only applies the client's write concern if NULL is provided in its write concern argument. Therefore, libmongoc does not do any merging of write concerns (e.g. w=2 URI option will not get merged with a wTimeoutMS write method option at runtime).

      Additionally, libmongoc's notion of MONGOC_WRITE_CONCERN_W_DEFAULT means that the "w" field is omitted when creating BSON for the write concern. It is used to depend on a server-side default (not inherit client options).

      I believe this is contrary to how the 1.x driver works, as we inherit individual options from the client (and parent objects). We should check if any of the specs address this inheritance; however, I assume they're silent on the matter, since most only discuss collection-level methods.

      Once we decide what inheritance model to support in Phongo, we should create relevant tests.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: