The list of secondary-aware ('obedient') commands in DB.java uses the camel-case version of commands like dbStats and collStats. The java driver itself emits these commands in lowercase: dbstats, collstats. Thus the commands whitelist check fails and the commands are always sent to the primary.
Commands are not fully case-insensitive (SERVER-6651), so the best fix for the moment is probably identifying the full list of command aliases supported by the server and making sure they're all in the whitelist.
- related to
-
JAVA-497 ReadPrefs ignored for commands
- Closed