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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.4.8
    • Component/s: None
    • None
    • Environment:
      Windows Pro10
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Mark Agarunov (Inactive)
            Reporter:
            Yi Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: