[SERVER-40057] Pass primary only readPref to CloneCollection cloneCollectionOptionsFromPrimaryShard Created: 08/Mar/19  Updated: 29/Oct/23  Resolved: 11/Mar/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.1.9

Type: Bug Priority: Major - P3
Reporter: Janna Golden Assignee: Janna Golden
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2019-03-25
Participants:
Linked BF Score: 7

 Description   

We currently get the read pref from the opCtx, but this is changed to secondaryPreferred when we run listCollections earlier in the command. CloneCollection cloneCollectionOptionsFromPrimaryShard must be run on a primary, so we should just pass PrimaryOnly as the read pref.



 Comments   
Comment by Githook User [ 11/Mar/19 ]

Author:

{'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}

Message: SERVER-40057 Use PrimaryOnly readPreference for cloneCollectionOptionsFromPrimaryShard
Branch: master
https://github.com/mongodb/mongo/commit/e9e2bf9cb0831c23a33c2bc2094e7cd0abf1f6ea

Generated at Thu Feb 08 04:53:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.