Use Mongo constructor to create initial connection

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: 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
              Reporter:
              Anna Henningsen
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: