Operations executed within transaction should not inherit read/write concern

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.5.0
    • Affects Version/s: 1.4.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Various operation methods in PHPLIB inherit a readConcern or writeConcern from the current class (e.g. Collection) if an explicit option is not provided by the user. For example, see Collection::insertOne(). This can be problematic if the operation is being executed within a transaction (see: Users cannot pass readConcern or writeConcern to operations in transactions).

      To address this, PHPLIB may need to discern whether a session option has been passed and whether a transaction has already been started on that session. I'm not sure if the MongoDB\Driver\Session API makes this possible, so this fix may actually require API improvements in PHPC itself if we need to introduce an isInTransaction() method (or similar).

            Assignee:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: