From 5f1b833ec95a22f18696d72383bfcc50693e07ab Mon Sep 17 00:00:00 2001 From: Andrew Feierabend Date: Fri, 26 Feb 2021 15:43:22 -0500 Subject: [PATCH] DOCS-14251 add opportunisticSecondaryTargeting v4.2 only --- source/reference/parameters.txt | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 2d242feb1ac..194d42499a1 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -2615,6 +2615,42 @@ Sharding Parameters - MongoDB 3.4.11+ +.. parameter:: opportunisticSecondaryTargeting + + .. versionadded:: 4.2.13 + + |mongos-only| + + Type: boolean + + Default: false + + When ``true``, enables a :binary:`~bin.mongos` to attempt to + establish connections to multiple secondaries and direct the request + to the first secondary that accepts the connection. + + .. note:: + + This feature was introduced in MongoDB 4.2.0 and enabled + by default. Starting in MongoDB 4.2.13, this feature is now + disabled by default. The + :parameter:`opportunisticSecondaryTargeting` parameter is + introduced alongside this change to permit re-enabling this + feature if desired. + + The following enables :parameter:`opportunisticSecondaryTargeting`: + + .. code-block:: sh + + mongos --setParameter opportunisticSecondaryTargeting=true + + The parameter may also be set using the :dbcommand:`setParameter` + command: + + .. code-block:: javascript + + db.adminCommand( { setParameter: 1, opportunisticSecondaryTargeting: true } ) + Storage Parameters ~~~~~~~~~~~~~~~~~~