Mongo.setSecondaryOk()
On this page
This version of the documentation is archived and no longer
supported. View the current documentation to learn how to
upgrade your version of MongoDB.
Definition
Mongo.setSecondaryOk()
Allows read operations on secondary members for the MongoDB connection.
Also means that eventually consistent read operations are acceptable for the current application. See
readPref()
for additional fine-grained settings for the read preference.
Example
This example calls setSecondaryOk()
:
db.getMongo().setSecondaryOk()