db.runCommand should inherit readPreference from the connection / db.getMongo as in the old shell.
To reproduce, connect to a secondary, set read preference of secondary in the mongo object, and try a db.runCommand(
{listDatabases: 1}), that should work if the read preference is inherited.
- causes
-
MONGOSH-1478 dropIndex() not working with readPreference=secondary in mongosh
- Closed
- is related to
-
COMPASS-6595 Initial ping command does not inherit connection readpreference
- Closed