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

Remove seemingly arbitrary time limits on javascript setup in group stage

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 3.4.0, 3.6.0, 4.0.0
    • JavaScript, Querying
    • None
    • 28

    Description

      These two scope->exec() calls calls impose a 2 second limit, which seems arbitrary and unnecessary:

          try {
              _scope->exec(
                  "$reduce = " + _request.reduceCode, "group reduce init", false, true, true, 2 * 1000);
          } catch (const AssertionException& e) {
              return e.toStatus("Failed to initialize group reduce function: ");
          }
       
          try {
              _scope->exec("$arr = [];",
                           "group reduce init 2",
                           false,  // printResult
                           true,   // reportError
                           true,   // assertOnError
                           2 * 1000);
          } catch (const AssertionException& e) {
              return e.toStatus("Failed to initialize group reduce function: ");
          }
      

      The operation should be interruptible anyway and susceptible to the usual maxTimeMS enforcement. This is causing some spurious failures in our testing infrastructure.

      There may be other timeouts imposed on calls into the javascript engine in group or elsewhere that we should look into as well.

      Attachments

        Activity

          People

            charlie.swanson@mongodb.com Charlie Swanson
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: