-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Internal Code
-
Fully Compatible
-
v5.0
-
Service arch 2020-09-07, Service arch 2020-10-05, Service arch 2020-11-02, Service arch 2020-11-16, Service arch 2020-12-28, Service Arch 2021-02-22, Service Arch 2021-03-08, Service Arch 2021-03-22, Service Arch 2021-04-05, Service Arch 2021-04-19, Service Arch 2021-05-17, Service Arch 2021-05-31
-
(copied to CRM)
-
166
Implementing a idea from the comments of SERVER-50459.
Some mongos-proxied or intracluster operations will have their error codes returned verbatim to the originating client. In some cases the error codes are related to connection health, and will be inappropriate for forwarding. The example we're using is InterruptedAtShutdown, but there are other members of this class of errors. This is because the client's driver is required to break connection when these codes are received, but really the error code refers to a proxy-to-internal connection, not the originating-client-to-proxy connection.
Obviously error codes that report on the status of a connection must be interpreted in the proper context. Client drivers currently assume that these errors refer to the client-proxy connection.
We've decided to go with a simple improvement. Proxy connections will translate connection-related errors into a new different error which, as a new code, has no behavioral effect on drivers receiving it.
It's still undecided whether there will be one new error code or many.
- is depended on by
-
SERVER-50459 Include "source" field in error responses from mongos
- Backlog
-
SERVER-51179 TenantMigrationDonorInstance should distinguish local and remote shutdown/stepdown errors
- Closed
-
SERVER-50550 Add source connection metadata to translated connection-relevant error codes
- Backlog
- related to
-
SERVER-50735 Mongos 4.4.0 can return the topologyVersion of a shard in state change errors
- Backlog
-
SERVER-57772 Failpoints on mongos rewrite state change error codes in writeConcernError
- Closed