static vars in header src/mongo/db/concurrency/lock_manager_defs.h

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: Concurrency
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • CAR Team 2025-05-12
    • 1
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      src/mongo/db/concurrency/lock_manager_defs.h is loaded with static string arrays and other static variables. This means that inline functions referencing these variables are violating the one definition rule, and it's also wasteful as each TU will have its own copy.

      I recommend inline for these variables.

            Assignee:
            Joan Bruguera Micó
            Reporter:
            Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: