Skip to content

Transaction support #1888

Closed
Closed
@Steveb-p

Description

@Steveb-p

Feature Request

Introduce transaction support on database level as MongoDB starts to allow since version 4.0.

Q A
New Feature yes
RFC yes/no
BC Break should not be a BC break

Summary

I'd like to ask for opinion and discuss future solutions regarding transactions in Doctrine ODM.

MongoDB documentation regarding transactions: https://docs.mongodb.com/manual/core/transactions/

There are a few relevant bits of information regarding this feature. Specifically:

In most cases, multi-document transaction incurs a greater performance cost over single document writes, and the availability of multi-document transaction should not be a replacement for effective schema design.

Multi-document transactions are available for replica sets only. Transactions for sharded clusters are scheduled for MongoDB 4.2

What is Doctrine ODM desired approach on this? Introducing beginTransaction(), transactional() methods into DocumentManager? Since MongoDB transactions incur performance penalty, they probably will not be enabled on flush by default?

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