[SERVER-40972] randomize the MONGO_INITIALIZER topological sort inputs Created: 02/May/19  Updated: 29/Oct/23  Resolved: 10/May/19

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 4.1 Required
Fix Version/s: 4.1.12

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

Issue Links:
Related
related to SERVER-48377 Make MONGO_INITIALIZER scrambling rep... Backlog
Backwards Compatibility: Fully Compatible
Sprint: Dev Tools 2019-05-06, Dev Tools 2019-05-20
Participants:

 Description   

The MONGO_INITIALIZER actions are stored in a hash map keyed by their string names. This is traversed to produce the inputs to the unstable topological sort that determines their execution order. They are inserted in some order determined by an executable's linker line. So, it's possible for a Graph that's missing a prerequisite constraint edge to slip through testing, since the input order will be kind of stable until an initializer changes its name or the link order changes.

Anyway, we should add randomness to the selections made by the topological sort so that if there's a missing dependency constraint we'll be likely to encounter it in testing.



 Comments   
Comment by Githook User [ 10/May/19 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-40972 de-recurse, exceptionize, randomize topSort
Branch: master
https://github.com/mongodb/mongo/commit/97dd5eae1899073c100bac86f9971478bd76bb7a

Generated at Thu Feb 08 04:56:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.