MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home

Read preferences, read and write concern, and collation can be overridden by various sources. The highest-priority sources for these options are listed first:

================== ============== ============== ========= Read Preferences Read Concern Write Concern Collation ================== ============== ============== ========= read_prefs opts opts opts Transaction Transaction Transaction ================== ============== ============== =========

In a transaction, read concern and write concern are prohibited in opts and the read preference must be primary or NULL. See the example for transactions and for the "distinct" command with opts.