-
Type: Spec Change
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: Retryability
-
None
-
Needed
-
While discussing some of the error reporting improvements that oleg.pudeyev has added to the Ruby driver, I learned that Ruby goes out of its way to report the specific server that produced an error ultimately reported when a retryable operation totally fails. This overcomes possible ambiguity where an operation can report an error message corresponding to the first or second attempt. Executing Retryable Write Commands states:
If an error would not allow the caller to infer that an attempt was made (e.g. connection pool exception originating from the driver), the original error should be raised. If the retry failed due to another retryable error or some 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).
While Command Monitoring can also be used to infer the error's originating server, we can't rely on that being enabled in production systems where applications might only be logging an exception.
The Retryable Reads spec does not appear to have any section discussing error reporting (possible oversight), but it should also be able to implement this.
If a driver already attaches a server description (or equivalent) to its exceptions for server-side errors, I think they could implement this ticket just by ensuring that the attached server is always the originating server of the error being reported. For example, a driver that always attaches the first attempt's server to such an exception should be changed to conditionally attach the first or second accordingly.
- is related to
-
PYTHON-4017 Errors on retryable ops should indicate originating server when possible
- Closed
- related to
-
RUBY-2004 Indicated attempt not always correct
- Closed
-
RUBY-1744 When handshake/auth fails, indicate which server authentication was attempted against and whether ssl was used
- Closed
-
RUBY-1905 Indicate which server operations were attempted on and attempt number in driver-surfaced exceptions
- Closed
-
RUBY-1954 Integration test for exceptions referencing second attempt's server for retryable operations
- Closed
- split to
-
PYTHON-4137 Return originating server on all server exceptions
- Backlog
-
CDRIVER-4753 Errors on retryable ops should indicate originating server when possible
- Backlog
-
CXX-2776 Errors on retryable ops should indicate originating server when possible
- Backlog
-
CSHARP-4826 Errors on retryable ops should indicate originating server when possible
- Closed
-
GODRIVER-3031 Errors on retryable ops should indicate originating server when possible
- Closed
-
JAVA-5225 Errors on retryable ops should indicate originating server when possible
- Closed
-
MOTOR-1201 Errors on retryable ops should indicate originating server when possible
- Closed
-
NODE-5719 Errors on retryable ops should indicate originating server when possible
- Closed
-
PHPLIB-1296 Errors on retryable ops should indicate originating server when possible
- Closed
-
RUBY-3340 Errors on retryable ops should indicate originating server when possible
- Closed
-
RUST-1787 Errors on retryable ops should indicate originating server when possible
- Closed