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

mongosh does not provide a number using count() for large collection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 1.0.5
    • Fix Version/s: 1.0.6
    • Component/s: Shell API
    • Labels:
    • Environment:
      macOS 10.14.6
    • Documentation Changes:
      Needed
    • Documentation Changes Summary:
      count() in mongosh behaves differently compared with mongo.
    • Sprint:
      Iteration Johannesburg, Iteration Kampala

      Description

      Problem Statement/Rationale

      What is going wrong?

      mongosh doesn't return a count() value. To get the cursor back, must hit ctrl-C.

      mongo shell 4.4 works fine

      Running embedded mongosh inside Compass 1.28.1 increases CPU over 100%, and control doesn't return either.

      Steps to Reproduce

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

      Collection has 6 million documents.

      See my COMPASS ticket created today

      Expected Results

      What do you expect to happen?

      See the count provided in mongo shell for same collection, 6555160.

      Actual Results

      What do you observe is happening?

      No value shown. Cursor is locked. Ctrl-C pressed to get cursor back.

      Additional Notes

      Any additional information that may be useful to include.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            felicia.hsieh Felicia Hsieh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: