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

Make mongo initializer order reproducible

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch
    • Service Arch 2024-05-13

      When sorting the list of MONGO_INITIALIZERS, we generate a random seed to shuffle the initializers within each dependency group in order to catch incorrect initialization order (https://github.com/10gen/mongo/blob/83fc0eae8051f624adb41a786fd8ad19c3371d54/src/mongo/base/dependency_graph.cpp#L159).

      However, if we do catch a bug through this shuffling, it will be very difficult to reproduce without knowing the random seed involved in the shuffle. We print the entire list of sorted dependencies at debug level 2, although it is sometimes very difficult to repro these types of bugs and reproing with the correct debug level set is difficult.

      We should print this seed so that we can easily reproduce those bugs if they do come up.

            Assignee:
            erin.mcnulty@mongodb.com Erin McNulty
            Reporter:
            erin.mcnulty@mongodb.com Erin McNulty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: