Mongo.setSecondaryOk()

On this page本页内容

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()