Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57155

Disable 'traceExceptions' in generational fuzzer suites

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query Optimization 2021-07-12, Query Optimization 2021-07-26, Query Optimization 2021-08-09, QO 2021-08-23

      Description

      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;
      };
      

        Attachments

          Activity

            People

            Assignee:
            alice.doherty Alice Doherty (Inactive)
            Reporter:
            charlie.swanson Charlie Swanson
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: