Server selection was introduced into mongoc_client_session_start_transaction for CDRIVER-3067 and CDRIVER-3161; however, neither patch considered the case where server selection might fail. If so, it looks like we'd attempt to access the property of a null pointer.
I propose adding a check and returning an error if a primary (or mongos node) could not be selected.
- is related to
-
CDRIVER-3067 Ensure 4.0 drivers return an error when attempting sharded transactions on 4.2
- Closed
-
CDRIVER-3161 Prohibit starting a transaction for maxWireVersion < 7
- Closed