Per this comment in SERVER-41343, explain is expected to respect a maxTimeMS applied to it. Testing appears to indicate that this is not the case:
> db.range.find({z:123}).maxTimeMS(1).explain(1).executionStats { "executionSuccess" : true, "nReturned" : 0, "executionTimeMillis" : 433, "totalKeysExamined" : 0, "totalDocsExamined" : 1000000, "executionStages" : { "stage" : "COLLSCAN", "filter" : { "z" : { "$eq" : 123 } }, "nReturned" : 0, "executionTimeMillisEstimate" : 309, "works" : 1000002, "advanced" : 0, "needTime" : 1000001, "needYield" : 0, "saveState" : 7822, "restoreState" : 7822, "isEOF" : 1, "invalidates" : 0, "direction" : "forward", "docsExamined" : 1000000 }, "allPlansExecution" : [ ] }
The operation certainly appears to have yielded thousands of times, which is supposed to allow the interruption to happen based on my understanding.
The log file suggests that the parameter itself is getting successfully passed to the server:
command: explain { explain: { find: "range", filter: { z: 123.0 }, maxTimeMS: 1.0 }
- related to
-
SERVER-28039 Add full maxTimeMS support to the explain command
- Closed
- mentioned in
-
Page Loading...