Skip to content

Commit 7145efa

Browse files
authored
DRIVERS-2170 Server info on retryable errors must reflect the originating server (#1480)
* DRIVERS-2170 server info on retryable errors must reflect originating server * update changelogs * simplify the paragraph
1 parent eef59d9 commit 7145efa

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

source/retryable-reads/retryable-reads.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ other error originating from the server, that error should be raised instead as
331331
the caller can infer that an attempt was made and the second error is likely
332332
more relevant (with respect to the current topology state).
333333

334+
If a driver associates server information (e.g. the server address or
335+
description) with an error, the driver MUST ensure that the reported server
336+
information corresponds to the server that originated the error.
337+
334338
4. Implementation constraints
335339
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
336340

@@ -705,6 +709,9 @@ degraded performance can simply disable ``retryableReads``.
705709
Changelog
706710
=========
707711
712+
:2023-12-05: Add that any server information associated with retryable
713+
exceptions MUST reflect the originating server, even in the
714+
presence of retries.
708715
:2023-11-30: Add ReadConcernMajorityNotAvailableYet to the list of error codes
709716
that should be retried.
710717
:2023-11-28: Add ExceededTimeLimit to the list of error codes that should

source/retryable-writes/retryable-writes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,10 @@ from the driver) or the error is labeled "NoWritesPerformed", the error from
423423
the previous attempt should be raised. If all server errors are labeled
424424
"NoWritesPerformed", then the first error should be raised.
425425

426+
If a driver associates server information (e.g. the server address or
427+
description) with an error, the driver MUST ensure that the reported server
428+
information corresponds to the server that originated the error.
429+
426430
The above rules are implemented in the following pseudo-code:
427431

428432
.. code-block:: typescript
@@ -851,6 +855,9 @@ Changelog
851855
=========
852856

853857
:2023-12-06: Clarify that writes are not retried within transactions.
858+
:2023-12-05: Add that any server information associated with retryable
859+
exceptions MUST reflect the originating server, even in the
860+
presence of retries.
854861
:2023-10-02: When CSOT is not enabled, one retry attempt occurs.
855862
:2023-08-26: Require that in a sharded cluster the server on which the
856863
operation failed MUST be provided to the server selection

0 commit comments

Comments
 (0)