Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-7802

compact() stuck in Compass embedded mongosh when using db.collectionname without quotes

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Minor - P4 Minor - P4
    • No version
    • Affects Version/s: 1.42.3
    • Component/s: Embedded Shell
    • None
    • Environment:
      OS: macOS 14.4.1
      node.js / npm versions:
      Additional info:
      Compass 1.42.3
    • Iteration Neptune
    • Not Needed
    • Developer Tools

      Problem Statement/Rationale

      What is going wrong? What action would you like the Engineering team to take?

      Please be sure to attach relevant logs with any sensitive data redacted.
      How to retrieve logs for: Compass; Shell

      Running "db.runCommand({ compact : collectionname})" with the collection name in quotes runs fine. ie db.runCommand({ compact : "movies"})

      However, running cmd without quotes around collection name does not generate error message that says to use quotes that would correct the problem.

      Using db.collection name without quotes shows a forever spinning icon. Ctrl-x or Ctrl-z doesn't exit the process

      Steps to Reproduce

      How could an engineer replicate the issue you’re reporting?

      In embedded mongosh,

      use sample_mflix

      db.runCommand({ compact : movies})

      db.runCommand({ compact : db.sessions})

      Expected Results

      What do you expect to happen?

      1. More meaningful error msg when quotes missing.
      2. Not to enter into a stuck state and get prompt back

      Actual Results

      What do you observe is happening?

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            basit.chonka@mongodb.com Basit Chonka
            Reporter:
            felicia.hsieh@mongodb.com Felicia Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: