@@ -292,9 +292,9 @@ Read Preference
292292~~~~~~~~~~~~~~~
293293
294294Read preference determines the candidate :manual:`replica set</replication/>`
295- members to which a query or command can be sent. They consist of a **mode** specified as
296- a symbol, an array of hashes known as **tag_sets**, and two timing options:
297- **local_threshold** and **server_selection_timeout**.
295+ members to which a query or command can be sent. They consist of a **mode**
296+ specified as a symbol, an array of hashes known as **tag_sets**, and two
297+ timing options: **local_threshold** and **server_selection_timeout**.
298298
299299``local_threshold``
300300 Defines the upper limit in seconds of the latency window
@@ -305,6 +305,12 @@ a symbol, an array of hashes known as **tag_sets**, and two timing options:
305305 Defines how long to block for server selection
306306 before throwing an exception. The default is 30,000 milliseconds, or 30 seconds.
307307
308+ .. note::
309+
310+ Read preference does not apply to Standalone deployments. When a client
311+ is connected to a Standalone deployment, any application-specified read
312+ preference is ignored.
313+
308314For more information on the algorithm used to select a server, please
309315refer to the `Server Selection documentation, available on GitHub
310316<https://github.com/mongodb/specifications/blob/master/source/server-sel
@@ -337,17 +343,29 @@ using the ``with`` method:
337343Mode
338344~~~~
339345
340- There are five possible read preference modes. They are ``:primary``,
341- ``:secondary``, ``:primary_preferred``, ``:secondary_preferred``,
342- ``:nearest``. Please see the :manual:`read preference documentation in the MongoDB Manual
343- </core/read-preference/>` for an explanation of the modes and tag sets.
346+ There are five possible read preference modes: ``:primary``, ``:secondary``,
347+ ``:primary_preferred``, ``:secondary_preferred`` and``:nearest``.
348+ Please see the :manual:`read preference documentation in the MongoDB Manual
349+ </core/read-preference/>` for an explanation of the modes.
350+
351+ .. note::
352+
353+ When a client is directly connected to a server using the ``:direct_connection``
354+ Ruby option or the ``directConnection`` URI option, read preference mode
355+ is automatically set to ``:primary_preferred`` to permit read operations
356+ against secondaries. If the application specified a ``:primary`` read
357+ preference mode, the mode is automatically converted to ``:primary_preferred``.
358+ If another read preference mode is specified, it is passed to the server
359+ unchanged.
344360
345361Tag sets
346362~~~~~~~~
347363
348364The ``tag_sets`` parameter is an ordered list of tag sets used to
349365restrict the eligibility of servers for selection, such as for data
350- center awareness.
366+ center awareness. Please see the :manual:`read preference documentation in
367+ the MongoDB Manual </core/read-preference/>` for an explanation of tag sets.
368+
351369
352370A read preference tag set (T) matches a server tag set (S) – or
353371equivalently a server tag set (S) matches a read preference tag set
0 commit comments