Skip to content

Commit 9426093

Browse files
authored
DOCS-15330 opportunistic reads v4.4 (#1863)
* DOCS-15330 opportunisticSecondaryTargeting (#1824) * DOCS-15330 Adds server parameter * DOCS-15330 Updates description * DOCS-15330 Updates notice * DOCS-15330 Updates metadata * DOCS-15330 Updates notice * DOCS-15330 Fixes per Joe * DOCS-15330 Fixes per Joe * DOCS-15330 Fixes per Vojislav * DOCS-15330 Version update per Jira
1 parent 164c118 commit 9426093

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

source/reference/parameters.txt

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,41 @@ Sharding Parameters
26322632
- :serverstatus:`shardedIndexConsistency` metrics returned by the
26332633
:dbcommand:`serverStatus` command.
26342634

2635+
.. parameter:: opportunisticSecondaryTargeting
2636+
2637+
.. versionadded:: 4.4.15
2638+
2639+
*Type*: boolean
2640+
2641+
*Default*: ``false``
2642+
2643+
|mongos-only|
2644+
2645+
Determines whether ``mongos`` performs opportunistic reads against
2646+
replica sets.
2647+
2648+
When this parameter is set to ``true``, :program:`mongos` directs secondary
2649+
reads to secondaries with active connections. It sends the request to the
2650+
first secondary that accepts the connection. When this parameter is set to
2651+
``false``, :program:`mongos` holds secondary reads until it can establish
2652+
a connection to a specific secondary, (except in the case of
2653+
:ref:`hedged reads <read-preference-hedged-read>`).
2654+
2655+
.. note::
2656+
2657+
Under certain workloads, opportunistic reads may trigger the
2658+
opening of unnecessary connections from :program:`mongos` to
2659+
:program:`mongod` and reduce overall performance.
2660+
This parameter should not be enabled unless your application has
2661+
a specific need for the feature.
2662+
2663+
For example, to set ``opportunisticSecondaryTargeting`` during startup:
2664+
2665+
.. code-block:: bash
2666+
2667+
mongos --setParameter opportunisticSecondaryTargeting=true
2668+
2669+
26352670
.. parameter:: shardedIndexConsistencyCheckIntervalMS
26362671

26372672
*New in version 4.4 (and 4.2.6).*

0 commit comments

Comments
 (0)