Details
-
Bug
-
Resolution: Done
-
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.