From 4a2aeeaf5e4d8ae410388a4c2e81358e9a083c95 Mon Sep 17 00:00:00 2001 From: Andrew Feierabend Date: Wed, 13 Jan 2021 16:07:20 -0500 Subject: [PATCH] DOCS-13981 clarify read preference nearest --- source/includes/read-preference-modes-table.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source/includes/read-preference-modes-table.rst b/source/includes/read-preference-modes-table.rst index 2fa4ab991cc..d0b1a907f6e 100644 --- a/source/includes/read-preference-modes-table.rst +++ b/source/includes/read-preference-modes-table.rst @@ -34,9 +34,17 @@ :ref:`hedged reads ` on sharded clusters. * - :readmode:`nearest` - - Operations read from the member of the :term:`replica set` with - the least network latency, irrespective of whether that member - is a :term:`primary` or :term:`secondary`. + - Operations read from a random eligible :term:`replica set` + member, irrespective of whether that member is a :term:`primary` + or :term:`secondary`, based on a specified latency threshold. + The operation considers the following when calculating latency: + + - The :urioption:`localThresholdMS` connection string option + - The :ref:`maxStalenessSeconds + ` read preference + option + - Any specified :doc:`tag sets + ` Starting in version 4.4, :readmode:`nearest` supports :ref:`hedged reads ` on sharded clusters