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

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6, v3.4
    • Sprint:
      Sharding 2018-11-05
    • Linked BF Score:
      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

            Assignee:
            jack.mulrow Jack Mulrow
            Reporter:
            jack.mulrow Jack Mulrow
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: