-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Query Optimization 2021-07-12, Query Optimization 2021-07-26, Query Optimization 2021-08-09, QO 2021-08-23
The generational fuzzers are known to generate a lot of queries which produce errors. In these cases, the logs will include a backtrace for the failed query which isn't all that useful and can be distracting and often erroneously extracted from the logs to indicate the reason for failure. It turns out this behavior is configurable via this 'traceExecptions' parameter:
doassert = function(msg, obj) { // eval if msg is a function if (typeof (msg) == "function") msg = msg(); if (typeof (msg) == "object") msg = tojson(msg); if (jsTest.options().traceExceptions) { if (typeof (msg) == "string" && msg.indexOf("assert") == 0) print(msg); else print("assert: " + msg); } var ex; if (obj) { ex = _getErrorWithCode(obj, msg); } else { ex = Error(msg); } if (jsTest.options().traceExceptions) { print(ex.stack); } throw ex; };