[SERVER-46881] Forbid modification to global initializer graph after commencing initializer execution Created: 16/Mar/20  Updated: 29/Oct/23  Resolved: 18/May/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Kevin Pulo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-03-23, Sharding 2020-04-06, Sharding 2020-04-20, Sharding 2020-05-04, Sharding 2020-05-18, Sharding 2020-06-01
Participants:

 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.



 Comments   
Comment by Githook User [ 18/May/20 ]

Author:

{'name': 'Kevin Pulo', 'email': 'kevin.pulo@mongodb.com', 'username': 'devkev'}

Message: SERVER-46881 Forbid adding nodes to initializer graph after starting initializer execution
Branch: master
https://github.com/mongodb/mongo/commit/9f6af24864286343052497e827f06cba350c3c3e

Generated at Thu Feb 08 05:12:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.