File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -2615,6 +2615,42 @@ Sharding Parameters
2615
2615
2616
2616
- MongoDB 3.4.11+
2617
2617
2618
+ .. parameter:: opportunisticSecondaryTargeting
2619
+
2620
+ .. versionadded:: 4.2.13
2621
+
2622
+ |mongos-only|
2623
+
2624
+ Type: boolean
2625
+
2626
+ Default: false
2627
+
2628
+ When ``true``, enables a :binary:`~bin.mongos` to attempt to
2629
+ establish connections to multiple secondaries and direct the request
2630
+ to the first secondary that accepts the connection.
2631
+
2632
+ .. note::
2633
+
2634
+ This feature was introduced in MongoDB 4.2.0 and enabled
2635
+ by default. Starting in MongoDB 4.2.13, this feature is now
2636
+ disabled by default. The
2637
+ :parameter:`opportunisticSecondaryTargeting` parameter is
2638
+ introduced alongside this change to permit re-enabling this
2639
+ feature if desired.
2640
+
2641
+ The following enables :parameter:`opportunisticSecondaryTargeting`:
2642
+
2643
+ .. code-block:: sh
2644
+
2645
+ mongos --setParameter opportunisticSecondaryTargeting=true
2646
+
2647
+ The parameter may also be set using the :dbcommand:`setParameter`
2648
+ command:
2649
+
2650
+ .. code-block:: javascript
2651
+
2652
+ db.adminCommand( { setParameter: 1, opportunisticSecondaryTargeting: true } )
2653
+
2618
2654
Storage Parameters
2619
2655
~~~~~~~~~~~~~~~~~~
2620
2656
You can’t perform that action at this time.
0 commit comments