If the shell is committed to matching the drivers Server Selection Spec, it needs to be updated to match behavior we decided on for drivers last year. See this section of the Server Selection Spec:
"runCommand" MUST use the default readPreference, "primary", regardless of previous calls to setReadPrefs(). "runCommand" SHOULD also accept an argument that allows the user to set an explicit read preference.
Command-specific helpers like "count", "getIndexes", "aggregate", and so on need to be reviewed and updated to match the spec's point number 3 that describes how helper methods behave.
Please ask david.golden, me, or any of the advisors on the spec for questions and justifications.
- is related to
-
SERVER-22516 mongos should apply client's read preference to all commands
- Backlog