mongoc_database_command_simple shouldn't use the database's read prefs if no prefs are provided in the parameter.
The generic command method has a default read preference of mode 'primary'. The generic command method MUST ignore any default read preference from client, database or collection configuration. The generic command method SHOULD allow an optional read preference argument.
If an explicit read preference argument is provided as part of the generic command method call, it MUST be used for server selection, regardless of the name of the command. It is up to the user to use an appropriate read preference, e.g. not calling renameCollection with a mode of 'secondary'.
- is related to
-
CDRIVER-807 Remove secondary-ok commands whitelist
- Closed