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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Service Arch

    Description

      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.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: