Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-2170 Server info on retryable errors must reflect the originating server #1480

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions source/retryable-reads/retryable-reads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ other error originating from the server, that error should be raised instead as
the caller can infer that an attempt was made and the second error is likely
more relevant (with respect to the current topology state).

If a driver associates server information (e.g. the server address or
description) with an error, the driver MUST ensure that the reported server
information corresponds to the server that originated the error.

4. Implementation constraints
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -705,6 +709,9 @@ degraded performance can simply disable ``retryableReads``.
Changelog
=========

:2023-12-05: Add that any server information associated with retryable
exceptions MUST reflect the originating server, even in the
presence of retries.
:2023-11-30: Add ReadConcernMajorityNotAvailableYet to the list of error codes
that should be retried.
:2023-11-28: Add ExceededTimeLimit to the list of error codes that should
Expand Down
7 changes: 7 additions & 0 deletions source/retryable-writes/retryable-writes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ from the driver) or the error is labeled "NoWritesPerformed", the error from
the previous attempt should be raised. If all server errors are labeled
"NoWritesPerformed", then the first error should be raised.

If a driver associates server information (e.g. the server address or
description) with an error, the driver MUST ensure that the reported server
information corresponds to the server that originated the error.

The above rules are implemented in the following pseudo-code:

.. code-block:: typescript
Expand Down Expand Up @@ -838,6 +842,9 @@ inconsistent with the server and potentially confusing to developers.
Changelog
=========

:2023-12-05: Add that any server information associated with retryable
exceptions MUST reflect the originating server, even in the
presence of retries.
:2023-10-02: When CSOT is not enabled, one retry attempt occurs.
:2023-08-26: Require that in a sharded cluster the server on which the
operation failed MUST be provided to the server selection
Expand Down
Loading