Skip to content

Commit c8cfa64

Browse files
DOCSP-20890 Add readPreference example (#254)
* DOCSP-20890 Add readPreference example * DOCSP-20890 updates for feedback
1 parent 0d3642c commit c8cfa64

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

source/reference/format/data-lake-configuration.txt

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,39 @@ The {+data-lake-short+} configuration has the following format:
570570
</core/read-preference/>`, which describes how to route read
571571
requests to the cluster.
572572

573+
.. example::
574+
575+
The following ``readPreference`` setting specifies ``secondary`` :manual:`mode </core/read-preference/#std-label-read-pref-modes-summary>`
576+
and ``ANALYTICS`` :atlas:`nodeType </reference/replica-set-tags/#node-types>`.
577+
578+
.. code-block:: json
579+
:copyable: false
580+
:emphasize-lines: 9-20
581+
582+
{
583+
...
584+
"stores": [
585+
{
586+
"provider": "atlas",
587+
"clusterName": <CLUSTER_NAME>,
588+
"name": <STORE_NAME>,
589+
"projectId": <PROJECT_ID>,
590+
"readPreference": {
591+
"mode": "secondary",
592+
"tagSets": [
593+
[
594+
{
595+
"name": "nodeType",
596+
"value": "ANALYTICS"
597+
}
598+
],
599+
...
600+
]
601+
}
602+
}
603+
]
604+
}
605+
573606
.. datalakeconf:: stores.[n].readPreference.mode
574607

575608
*Optional.* :manual:`Read preference mode
@@ -595,7 +628,7 @@ The {+data-lake-short+} configuration has the following format:
595628

596629
.. datalakeconf:: stores.[n].readPreference.maxStalenessSeconds
597630

598-
*Optional.* Maximum replication lag, or staleness, for reads
631+
*Optional.* Maximum replication lag, or "staleness", for reads
599632
from secondaries. To learn more about ``maxStalenessSeconds``,
600633
see :manual:`Read Preference maxStalenessSeconds
601634
</core/read-preference-staleness/>`.

0 commit comments

Comments
 (0)