Docs Menu

rs.secondaryOk()

On this page

  • Definition
  • Example
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
See also:
←  rs.remove()rs.status() →

On this page

Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.