[SERVER-16757] Incorrect query report for $explain Created: 07/Jan/15 Updated: 15/Jan/15 Resolved: 08/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging, Shell |
| Affects Version/s: | 2.8.0-rc4 |
| Fix Version/s: | 2.8.0-rc5 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Thomas Rueckstiess | Assignee: | Eric Milkie |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
Using .explain() results in a log line like this:
But using $explain or ._addSpecial( "$explain", 1 ) results in this log line:
I don't know where "isMaster" comes from, but it has nothing to do with the query. Also, using different ways of running explain shows different shell behavior (no linebreaks vs. pretty printed output). $explain version
_addSpecial version
.explain() version
|
| Comments |
| Comment by Githook User [ 08/Jan/15 ] | ||||
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: | ||||
| Comment by Thomas Rueckstiess [ 07/Jan/15 ] | ||||
|
To reproduce: 1. start mongod with -v
3. log file contains these messages
| ||||
| Comment by Eric Milkie [ 07/Jan/15 ] | ||||
|
You're right, and I wonder if this is related to | ||||
| Comment by Thomas Rueckstiess [ 07/Jan/15 ] | ||||
|
Okay, looks like .explain() is identical to the command. And $explain is identical to _addSpecial. But none of these should contain a reference to the "isMaster" command in the log message. Perhaps something is not initialized correctly and it uses the previous command's name. | ||||
| Comment by Eric Milkie [ 07/Jan/15 ] | ||||
|
Using the shell helper in 2.8 uses the new "explain" command, if it is supported by the server. The command has different behavior than using the query modifier. If you try running the "explain" command by hand without the shell helper, it may have closer behavior to the shell helper. |