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

Forbid modification to global initializer graph after commencing initializer execution

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: 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

      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.

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

              Created:
              Updated:
              Resolved: