Navigation

Mongo.setSecondaryOk()

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.

This example calls setSecondaryOk():

db.getMongo().setSecondaryOk()
Tip
See also:
Give Feedback

On this page

  • Definition
  • Example