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

Scope can forget to load system.js procedures if interrupted

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.4.0-rc2, 4.7.0
    • 4.5.1
    • None
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Query 2020-04-20, Query 2020-05-04
    • 32

    Description

      When you tell a Scope instance to load procedures from system.js, it uses a version number to decide whether the contents of system.js are unchanged. When the version number matches, it does nothing; when the version number is different, it does the actual work of loading stored procedures.

      The problem is, the Scope instance updates its version number before doing the work, so if an exception happens during the work, the Scope thinks it's up to date when it's not.

      To fix it we can move this line to the bottom of the function: https://github.com/mongodb/mongo/blob/master/src/mongo/scripting/engine.cpp#L227

      Attachments

        Activity

          People

            david.percy@mongodb.com David Percy
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: