Skip to content

WriteConcern option never passes into MongoDB #2292

Closed
@ossinkine

Description

@ossinkine

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions