Details
-
Investigation
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
Not Needed
-
Iteration Quahog
Description
This is a dependency for DRIVERS-555 to be effective.
Description of Linked Ticket
Summary
Expose RetryableWriteError and NoWritesPerformed error labels from mongos to drivers.
Motivation
Since MongoDB 4.4 (SERVER-41245), drivers rely on the RetryableWriteError label to indicate whether or not an error response from the server warrants a retry. Current versions of mongos only return the RetryableWriteError label when the mongos itself is shutting down and not when there’s been a retryable error from one of the shards. Note that mongos itself retries on retryable errors from the shards up to three (3) times.
The work from DRIVERS-555 (Client Side Operations Timeout) enables applications to set a deadline until which the driver should continue to retry. This may mean an application is willing to retry longer than the duration of the retries performed by mongos. Having mongos propagate back a RetryableWriteError label when it gives up retrying can signal to drivers whether they want to continue retrying themselves.
Moreover, drivers also rely on the NoWritesPerformed error label (SERVER-66479) to decide upon retry which error response to expose to the application. Current versions of mongos never return the NoWritesPerformed error label.