Fix Legacy shell {{new Mongo}} translates all connection establishment errors to InternalError

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When running new Mongo in the shell, it calls into this function in C++. It establishes a connection here by calling MongoURI::connect (here). That function just returns a DBClientBase* with nullptr indicating any type of failure, despite it having access to the underlying Status here. Since new Mongo doesn't have access to the status, it just throws an InternalError for all types of errors here.

      This makes it hard for jstests to retry connection establishment. You might want to retry on network errors but not other classes of error, but everything is just an InternalError.

              Assignee:
              Arun Banala
              Reporter:
              Ryan Berryhill
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: