-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
In order for PHPLIB-368 to determine whether it is permissible to inherit a read/write concern from the object on which an operation is executed (e.g. Collection), it requires some way of discerning whether a Session is in a transaction.
If you look at CR: prohibit per-operation options in txn for CDRIVER-2558, you'll see that libmongoc internally uses _mongoc_client_session_in_txn() to check if a session is in an active transaction before deciding whether to inherit class-level defaults for read/write concern. In order to facilitate that logic in PHPLIB, PHPC may require that method to be exposed in libmongoc's public API.
I also spoke to kevin.albertson about exposing the various transaction states to PHP, but we agreed that's not really necessary for this so we should err on the side of not creating public API without good reason (libmongoc also doesn't seem to expose txn state to the user in any way).
- depends on
-
CDRIVER-2729 Add mongoc_client_session_in_transaction() to public API
- Closed
- is depended on by
-
PHPLIB-368 Operations executed within transaction should not inherit read/write concern
- Closed
- is related to
-
CDRIVER-2558 Implement Transactions spec
- Closed
- related to
-
PHPC-1243 Calling session methods after Session::endSession() causes use-after-free crash
- Closed