Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50549

Transform connection-related error codes in proxied commands

    • 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
    • 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.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: