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

DBClient_Connection should retain error code information

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.3
    • Component/s: Internal Client
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Repl 2019-12-02

      Description

      Currently DBClientConnection will sometimes return an internal code for network errors, which means its user cannot tell these are network errors which could be retried. We should change this so DBClientConnection and related classes pass any network errors up as network errors.

      Examples:

      https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_connection.cpp#L540

      https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_connection.cpp#L625

      https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_cursor.cpp#L276

      https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_base.cpp#L591 (this is probably not a network error but we should still propagate the error code)

      https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_base.cpp#L651

      https://github.com/mongodb/mongo/blob/master/src/mongo/client/dbclient_base.cpp#L772

      Some of these will require changing lower level classes to preserve error information.

        Attachments

          Activity

            People

            Assignee:
            matthew.russotto Matthew Russotto
            Reporter:
            matthew.russotto Matthew Russotto
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: