Closed
Description
Bug Report
Q | A |
---|---|
BC Break | no |
Version | 2.2.0 |
Summary
I'm sorry in advance if I've just not figured out.
I want to be sure the transaction was processed on majority replicas, I've set up w: majority
option in doctrine_mongodb.default_commit_options
, and try to debug where this option passed into MongoDB and did not find any cases. DocumentPersister::getWriteOptions
returns ['w' => 'majority']
and then options passew to MongoDB\Collection::updateOne
which never usew w
key, it expects writeConcern
key with object instance of MongoDB\Driver\WriteConcern
.
Current behavior
WriteConcern option never passes into MongoDB.
How to reproduce
Just try to pass w
as write options and check it's never used in mongodb/mongodb
.
Expected behavior
WriteConcern correctly passes info mongodb/mongodb
and exists in request.