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

Couldn't get output from mongo shell on windows for some edge cases

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.4.8
    • None
    • None
    • Windows Pro10

    Description

      If I type this command through mongo shell db.test.explain().find(), I should get a json output about the explain. It doesn't work for some cases I am not sure why. After investigating I found that below is the explain.find function definition in javascript.

      rs0:PRIMARY> db.test.explain().find
      function () {
                  var cursor = this._collection.find.apply(this._collection, arguments);
                  return new DBExplainQuery(cursor, this._verbosity);
              }
      

      compare with below command:

      rs0:PRIMARY> db.test.find().explain
      function (verbose) {
          var explainQuery = new DBExplainQuery(this, verbose);
          return explainQuery.finish();
      }
      

      it looks like the previous one miss finish() call. I don't know why this finish is not called in some cases on windows.

      Attachments

        Activity

          People

            mark.agarunov Mark Agarunov
            zhaoyi0113@gmail.com Yi Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: