Skip to content

Commit c3d9175

Browse files
committed
AS feedback
1 parent 449e98a commit c3d9175

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

source/connect/connection-options/server-selection.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Customize Server Selection
1515
:values: reference
1616

1717
.. meta::
18-
:keywords: read preference, write
18+
:keywords: read preference, write, server selection
1919

2020
Overview
2121
--------
@@ -37,26 +37,26 @@ in order, to select a MongoDB deployment:
3737

3838
1. Selects all servers that match the active read preference from the list of known servers.
3939

40-
#. If at least one readable server exists, the driver calls the user-defined
41-
server-selector function and passes in the list from the previous step.
40+
#. If at least one readable server exists, calls the user-defined
41+
server-selector function and passes in the list from the previous step
4242

4343
#. Applies the ``localThreshold`` connection setting to the list of
44-
servers returned from the function.
44+
servers returned from the function
4545

4646
#. Selects a server at random from the servers still on the list and
47-
executes the operation against this server.
47+
executes the operation against this server
4848

4949
When the {+driver-short+} executes a write operation, it begins by selecting all writeable
50-
servers, not just those that match the active read preference. The remaining steps are
51-
identical.
50+
servers from the list of known servers, not just those that match the active read preference.
51+
The remaining steps are identical to the preceding list.
5252

5353
To learn more about the default server selection algorithm, which the driver follows
5454
when you don't specify any custom server selection logic, see
5555
:manual:`Server Selection Algorithm </core/read-preference-mechanics/>` in the
5656
{+mdb-server+} manual.
5757

58-
Implementing Custom Server Selection Logic
59-
------------------------------------------
58+
Implement Custom Server Selection Logic
59+
---------------------------------------
6060

6161
You can implement your own custom server selection logic by creating a class that
6262
implements the ``ServerSelector`` interface and overrides the ``select()`` method. The following
@@ -69,18 +69,18 @@ value of ``ServerType.REPLICA_SET_SECONDARY``:
6969
:start-after: // start-custom-selector
7070
:end-before: // end-custom-selector
7171

72-
You can then pass an instance of this class to your ``MongoClientSettings`` object by
73-
using the ``applyToClusterSettings()`` method. The following example shows how to create
74-
a ``MongoClient`` with an instance of the custom server selector from the preceding example:
72+
Use the ``applyToClusterSettings()`` method to pass an instance of this class to your
73+
``MongoClientSettings``. The following example shows how to create
74+
a ``MongoClient`` with an instance of the custom server selector class from the preceding example:
7575

7676
.. literalinclude:: /includes/connect/ServerSelection.kt
7777
:language: kotlin
7878
:copyable: true
7979
:start-after: // start-selector
8080
:end-before: // end-selector
8181

82-
Using Settings to Configure Server Selection
83-
--------------------------------------------
82+
Use Settings to Configure Server Selection
83+
------------------------------------------
8484

8585
You can specify the following server selection settings in your ``MongoClient`` object or
8686
in your connection URI:
@@ -119,7 +119,7 @@ in your connection URI:
119119
* - ``serverSelectionTimeout``
120120
- | The length of time the driver tries to select a server before timing out.
121121
|
122-
| **Data Type**: ``long``
122+
| **Data Type**: ``Long``
123123
| **Default**: 30 seconds
124124
| **Connection URI Example**: ``serverSelectionTimeoutMS=15000``
125125

0 commit comments

Comments
 (0)