Remove seemingly arbitrary time limits on javascript setup in group stage

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.4.0, 3.6.0, 4.0.0
    • Component/s: JavaScript, Querying
    • None
    • 28
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Charlie Swanson
              Reporter:
              Charlie Swanson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: