-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Diagnostics, Querying
-
Query Execution
-
ALL
Stats information is not gathered for queries that encounter an execution error. As a result, the per-operation diagnostic messages logged for these queries are missing debug information, and the metrics counters tracked for serverStatus are not updated for these queries.
The following script will reproduce this issue:
var bigDoc = {a: new Array(15*1024*1024).join("x")}; db.setLogLevel(1); db.foo.drop(); db.foo.insert([bigDoc, bigDoc, bigDoc]); db.foo.find().sort({a: 1}).itcount(); // 32MB sort limit exceeded, triggers execution error.
When run against mongod version 3.2.1, the server generates the following diagnostic log line. Note that "nscanned" and "nscannedObjects" are not present.
2016-01-20T18:06:36.741-0500 I QUERY [conn3] query test.foo query: { query: {}, orderby: { a: 1.0 } } planSummary: COLLSCAN ntoreturn:0 ntoskip:0 keyUpdates:0 writeConflicts:0 exception: Executor error: OperationFailed Sort operation used more than the maximum 33554432 bytes of RAM. Add an index, or specify a smaller limit. code:17144 numYields:1 reslen:184 locks:{ Global: { acquireCount: { r: 4 } }, MMAPV1Journal: { acquireCount: { r: 2 } }, Database: { acquireCount: { r: 2 } }, Collection: { acquireCount: { R: 2 } } } 21ms
- related to
-
SERVER-22250 Diagnostic log messages missing debug information for query operations with execution times close to "slowms"
- Backlog
-
SERVER-15292 Failed update reports erroneous WriteResult
- Backlog
-
SERVER-17862 Unify stats reporting for log/profiler across CRUD operations
- Closed