Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-661

Use Mongo constructor to create initial connection

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Tech debt
    • None
    • Not Needed

      We currently have connection initiation code in two main places, namely, the Mongo constructor/.connect() method and the CliRepl .start() method.

      This leads to problems when there’s discrepancies (like this) between the two.

      One solution would be to use the Mongo constructor to create the first connection always, and not perform connection management inside the cli-repl package (i.e. always create a nodb-style shell first). This probably mirrors what the old shell did a bit more closely as well.

      If we can do it, I think this is worth it, although the fact that we don’t allow creating connections in non-CLI environments might end up being problematic here.

            Assignee:
            Unassigned Unassigned
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: