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

Forbid modification to global initializer graph after commencing initializer execution

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.7.0
    • None
    • Internal Code
    • None
    • Fully Compatible
    • Sharding 2020-03-23, Sharding 2020-04-06, Sharding 2020-04-20, Sharding 2020-05-04, Sharding 2020-05-18, Sharding 2020-06-01

    Description

      There are components which wrap global initializers, eg. ServiceContext::ContructorActionRegisterer. If these are used inside MONGO_INITIALIZER they will silently fail to run. Since the graph has already been flattened by this time, doing this is invalid, but the abstraction makes it hard to know that this happened. As such, executeInitializers() should "freeze" the graph prior to running the initializer functions, to prevent these nodes from being added.

      Attachments

        Activity

          People

            kevin.pulo@mongodb.com Kevin Pulo
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: