Docs Menu

Docs HomeMongoDB Manual

Mongo.getSecondaryOk()

On this page

  • Definition
  • Example
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

See also:

←  Mongo.getReadPrefTagSet()Mongo.isCausalConsistency() →

On this page

Share Feedback
© 2023 MongoDB, Inc.

About

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