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

browser-repl autocompleter calls fetchConnectionInfo a lot

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.7
    • Affects Version/s: None
    • Component/s: Browser Module
    • Labels:
      None
    • Not Needed
    • Iteration Lutz

      When first entering text into the browser REPL, fetchConnectionInfo() is called multiple times by the autocompleter, when it should really be called once.

      https://github.com/mongodb-js/mongosh/blob/bbe3826944dc721996a964ab7676a56e42710749/packages/browser-runtime-core/src/open-context-runtime.ts#L51-L55

      This is probably happening because that code does not handle concurrent getCompletions() calls properly.

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

              Created:
              Updated:
              Resolved: