-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 3.0.3
-
Component/s: Command Operations
-
None
The getStats() helper on DBCollection always uses the "primary" read preference, regardless of what read preference is set on the underlying collection. According to the server selection spec, the collStats command may use a "secondary" read preference: https://github.com/mongodb/specifications/blob/master/source/server-selection/server-selection.rst#use-of-read-preferences-with-commands
This bug only affects the 3.0 version of the Java driver.