-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.4.0
-
Component/s: 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).
- depends on
-
CDRIVER-2729 Add mongoc_client_session_in_transaction() to public API
- Closed
-
PHPC-1231 Add Session::isInTransaction to indicate whether a transaction is active
- Closed
- is related to
-
PHPLIB-364 Document that transactions do not allow per-op read/write concerns
- Closed