-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Transaction Management
-
None
The 4.0 transaction spec says:
startTransaction SHOULD report an error if the driver can detect that transactions are not supported by the deployment. A deployment does not support transactions when the deployment does not support sessions, or maxWireVersion < 7, or the topology type is Sharded
However, the Java driver never implemented this check. When 3.10.1 runs a transaction against MongoDB 4.2, it will get an error like this on the first command that goes to a new mongos:
{ 'ok': 0.0, 'errmsg': 'cannot continue txnId -1 for session ... with txnId 1', 'code': 251, 'codeName': 'NoSuchTransaction', 'errorLabels': ['TransientTransactionError'] }
- is depended on by
-
DRIVERS-624 Ensure 4.0 drivers return an error when attempting sharded transactions on 4.2
- Closed
- related to
-
PYTHON-1781 PyMongo 3.7 does not raise an error when attempting sharded transactions on 4.2
- Closed