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

Mongo Atlas web UI hangs indefinitely for docs with a regex BSON type and option "g"

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.0.11
    • Component/s: None
    • None
    • ALL
    • Hide

      Save a JSON document with this content:

      {"abc":[{"$regularExpression":{"pattern":"^/([A-Za-z0-9.-]+)$","options":"g"}}]} 

      Import it via mongorestore:

      mongoimport mongodb+srv://altlas-cluster/my_db --collection abc

      In Atlas web UI, navigate to the database in question, click collection abc and click Find.

      The UI will show Loading Documents... and will never show any documents. If the same document is imported with just "options": "", documents in that collection will be shown as usual.

      It's not just options, however - I have other regex in the database, also imported with options: "g", and it works Ok, but this regex combined with the global option triggers something.

      Show
      Save a JSON document with this content: {"abc":[{"$regularExpression":{"pattern":"^/([A-Za-z0-9.-]+)$","options":"g"}}]} Import it via mongorestore : mongoimport mongodb+srv://altlas-cluster/my_db --collection abc In Atlas web UI, navigate to the database in question, click collection abc and click  Find . The UI will show  Loading Documents... and will never show any documents. If the same document is imported with just "options": "" , documents in that collection will be shown as usual. It's not just options , however - I have other regex in the database, also imported with options: "g" , and it works Ok, but this regex combined with the global option triggers something.

      I don't see Atlas or web UI in the list of projects, so I'm reporting it in the core server.

      If I import a document with a specific regex field and an option g, as shown below, then trying to list documents in the affected collection hangs forever in Atlas web UI. When trying the same via aggregation, the pipeline reports an out-of-place "e is undefined" error.

            Assignee:
            Unassigned Unassigned
            Reporter:
            cis74633@bell.net Andre M
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: