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

Remove seemingly arbitrary time limits on javascript setup in group stage

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 3.4.0, 3.6.0, 4.0.0
    • Fix Version/s: None
    • Component/s: JavaScript, Querying
    • Labels:
      None
    • Linked BF Score:
      12

      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

            • Assignee:
              charlie.swanson Charlie Swanson
              Reporter:
              charlie.swanson Charlie Swanson
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: