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

Make it safe to launch threads from the constructors of decorations on ServiceContext

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

      Launching threads in ServiceContext decoration constructors and constructor actions is currently prohibited, but it doesn't have to be. By doing the work to make the code in this range thread safe, and moving the construction of decorations to the end of the ServiceContext constructor, we could allow decorations to create threads and access the ServiceContext they decorate. This would simplify a lot of subsystem setup code that currently has to lazily initialize thread pools on first use or in a startup routing invoked directly from mongod or mongos's main functions.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: