Skip to content

Commit ef68c4e

Browse files
committed
DOCS-14251 add opportunisticSecondaryTargeting v4.2 only
1 parent b4a7a56 commit ef68c4e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

source/reference/parameters.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2627,6 +2627,42 @@ Sharding Parameters
26272627

26282628
- MongoDB 3.4.11+
26292629

2630+
.. parameter:: opportunisticSecondaryTargeting
2631+
2632+
.. versionadded:: 4.2.13
2633+
2634+
|mongos-only|
2635+
2636+
Type: boolean
2637+
2638+
Default: false
2639+
2640+
When ``true``, enables a :binary:`~bin.mongos` to attempt to
2641+
establish connections to multiple secondaries and direct the request
2642+
to the first secondary that accepts the connection.
2643+
2644+
.. note::
2645+
2646+
This feature was introduced in MongoDB 4.2.0 and enabled
2647+
by default. Starting in MongoDB 4.2.13, this feature is now
2648+
disabled by default. The
2649+
:parameter:`opportunisticSecondaryTargeting` parameter is
2650+
introduced alongside this change to permit re-enabling this
2651+
feature if desired.
2652+
2653+
The following enables :parameter:`opportunisticSecondaryTargeting`:
2654+
2655+
.. code-block:: sh
2656+
2657+
mongos --setParameter opportunisticSecondaryTargeting=true
2658+
2659+
The parameter may also be set using the :dbcommand:`setParameter`
2660+
command:
2661+
2662+
.. code-block:: javascript
2663+
2664+
db.adminCommand( { setParameter: 1, opportunisticSecondaryTargeting: true } )
2665+
26302666
Storage Parameters
26312667
~~~~~~~~~~~~~~~~~~
26322668

0 commit comments

Comments
 (0)