Skip to content

MongoDB request DSLopensavvy.ktmongo.dsl.optionsReadPreferenceSecondaryPreferred

SecondaryPreferred

The query is sent to the secondary members of the replica set.

If the replica set doesn't have secondaries (e.g. they all crashed), then the query is sent to the primary.

Read operations using this preference may return stale data.

External resources

Properties

bsonName

name

val name: String

ordinal

val ordinal: Int