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

The balancer shouldn't register a shutdown task after the process is multithreaded

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v4.0, v3.6, v3.4
    • Sharding 2018-11-05
    • 0

    Description

      The balancer registers a shutdown task when it is created, but this happens after the mongod process is multithreaded, so it's possible for the server to be shutting down when the task is registered, which triggers this invariant.

      Instead, we should probably check if the balancer exists in shutdownTask() defined in db.cpp and shut it down if it does, similar to what's done for other components. 

      Attachments

        Activity

          People

            jack.mulrow@mongodb.com Jack Mulrow
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: