Skip to content

Commit

Permalink
Clarify that deprioritized servers are only for sharded
Browse files Browse the repository at this point in the history
  • Loading branch information
comandeo-mongo committed Aug 21, 2023
1 parent 49fe649 commit 4a98a13
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions source/retryable-reads/retryable-reads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ selecting a server for a retry attempt.
3a. Selecting the server for retry
''''''''''''''''''''''''''''''''''

In sharded topology, the server on which the operation failed MUST be provided
In sharded cluster, the server on which the operation failed MUST be provided
to the server selection mechanism as a deprioritized server.

If the driver cannot select a server for
Expand Down Expand Up @@ -692,7 +692,7 @@ degraded performance can simply disable ``retryableReads``.
Changelog
=========
:2023-08-??: Require that in a sharded topology the server on which the
:2023-08-??: Require that in a sharded cluster the server on which the
operation failed MUST be provided to the server selection
mechanism as a deprioritized server.
:2022-11-09: CLAM must apply both events and log messages.
Expand Down
6 changes: 3 additions & 3 deletions source/retryable-writes/retryable-writes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ of the following conditions is reached:
<../client-side-operations-timeout/client-side-operations-timeout.rst#retryability>`__.
- CSOT is not enabled and one retry was attempted.

For each retry attempt, drivers MUST select a writable server. In sharded
topology, the server on which the operation failed MUST be provided to
For each retry attempt, drivers MUST select a writable server. In a sharded
cluster, the server on which the operation failed MUST be provided to
the server selection mechanism as a deprioritized server.

If the driver cannot select a server for a retry attempt
Expand Down Expand Up @@ -829,7 +829,7 @@ inconsistent with the server and potentially confusing to developers.
Changelog
=========
:2023-08-??: Require that in a sharded topology the server on which the
:2023-08-??: Require that in a sharded cluster the server on which the
operation failed MUST be provided to the server selection
mechanism as a deprioritized server.
:2022-11-17: Add logic for persisting "currentError" as "previousError" on first
Expand Down
12 changes: 8 additions & 4 deletions source/server-selection/server-selection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -843,9 +843,11 @@ For multi-threaded clients, the server selection algorithm is as follows:
2. If the topology wire version is invalid, raise an error and log a
`"Server selection failed" message`_.

3. Find suitable servers by topology type and operation type. In the case of
sharded clusters, a list of deprioritized servers may be provided;
3. Find suitable servers by topology type and operation type. If a list of
deprioritized servers is provided, and the topology is sharded cluster,
these servers should be selected only if there are no other suitable servers.
The server selection algorithm MUST ignore the deprioritized servers if the
topology is not sharded cluster.

4. Filter the suitable servers by calling the optional, application-provided server
selector.
Expand Down Expand Up @@ -917,9 +919,11 @@ as follows:
5. If the topology wire version is invalid, raise an error and log a
`"Server selection failed" message`_.

6. Find suitable servers by topology type and operation type. In the case of
sharded clusters, a list of deprioritized servers may be provided;
6. Find suitable servers by topology type and operation type. If a list of
deprioritized servers is provided, and the topology is sharded cluster,
these servers should be selected only if there are no other suitable servers.
The server selection algorithm MUST ignore the deprioritized servers if the
topology is not sharded cluster.

7. Filter the suitable servers by calling the optional, application-provided
server selector.
Expand Down

0 comments on commit 4a98a13

Please sign in to comment.