[GODRIVER-1713] RunCommand does not pass read preference to operations layer Created: 11/Aug/20  Updated: 28/Oct/23  Resolved: 25/Aug/20

Status: Closed
Project: Go Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.1

Type: Bug Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

RunCommand/RunCommandCursor use the read preference to create a server selector. In addition to this, they should pass it down to the operations layer so a $readPreference can be added to the command. This is important when connected to a sharded cluster because mongos relies on the $readPreference field in the command to select a server.



 Comments   
Comment by Githook User [ 25/Aug/20 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: GODRIVER-1713 Pass read preference to operations layer for RunCommand (#487)
Branch: release/1.4
https://github.com/mongodb/mongo-go-driver/commit/189f7a789a7c35879e8746a77af9fbec1d5a9861

Comment by Githook User [ 25/Aug/20 ]

Author:

{'name': 'Divjot Arora', 'email': 'divjot.arora@10gen.com', 'username': 'divjotarora'}

Message: GODRIVER-1713 Pass read preference to operations layer for RunCommand (#487)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/9958c4b4220325171bd742c536371d2b9628f66b

Comment by Divjot Arora (Inactive) [ 19/Aug/20 ]

https://github.com/mongodb/mongo-go-driver/pull/487

Generated at Thu Feb 08 08:36:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.