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 @@ -2627,6 +2627,42 @@ Sharding Parameters
2627
2627
2628
2628
- MongoDB 3.4.11+
2629
2629
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
+
2630
2666
Storage Parameters
2631
2667
~~~~~~~~~~~~~~~~~~
2632
2668
You can’t perform that action at this time.
0 commit comments