Details
-
Bug
-
Resolution: Fixed
-
Major - P3
-
1.15.0
-
None
-
None
Description
When providing the _mongoc_client_command_with_opts function with a server_id in opts, mongoc_cluster_stream_for_server is called directly, skipping server selection logic contained in _mongoc_cluster_select_server_id. However, this also bypasses session pinning when using sharded transactions. The pinning should happen regardless of who performs server selection. Fixing this by pinning in mongoc_cluster_stream_for_server instead of during server selection also resolves a similar issue when providing a server_id option to the mongoc_bulk_operation_execute and _mongoc_cursor_fetch_stream functions.
The rationale behind this is that the PHP driver performs server selection itself before issuing commands, as it needs to know which server a command ran on for result cursors and write result objects.
Attachments
Issue Links
- is depended on by
-
PHPC-1290 Support mongos pinning for sharded transactions
-
- Closed
-