Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Docs Menu
Docs Home
/
MongoDB Manual
/ / /

rs.secondaryOk()

rs.secondaryOk()

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.

rs.secondaryOk() calls Mongo.setSecondaryOk().

This example calls rs.secondaryOk():

rs.secondaryOk()

Tip

Back

rs.remove()

On this page