-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.0
-
Component/s: Command Operations
-
None
-
Environment:Linux 64 Bit
In the API doc is stated:
By default, all read and write operations will be made on the primary, but it's possible to read from secondaries by changing the read preference:
mongoClient.setReadPreference(ReadPreference.secondaryPreferred());
However, this seems not to apply at least to the follwing methods because they are overriding the actual set ReadPreference by "ReadPreference.primary()":
- listDatabases()
- listDatabaseNames()
- getDatabase(dbName).listCollections()
This is very annoying because we want explicitly get this info from a secondary.
- duplicates
-
JAVA-1767 listCollections helper fails with direct connection to a secondary
- Closed