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

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

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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-mico@mongodb.com Joan Bruguera Micó
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: