Learn the "why" behind slow queries and how to fix them in our 2-Part Webinar.
Register now >
Docs Menu
Docs Home
/ /
Connection Methods

Mongo.getSecondaryOk()

Mongo.getSecondaryOk()

Indicates whether the MongoDB connection allows read operations on secondary members.

Returns:True if the MongoDB connection allows read operations on secondary members. Otherwise, returns false.

This example calls getSecondaryOk():

db.getMongo().getSecondaryOk()

Tip

Back

Mongo.getReadPrefTagSet()

On this page