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

Skip shutting down Grid::getExecutorPool() when TestProctor is disabled

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc8, 6.0.10, 5.0.21
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v7.0
    • Service Arch 2023-07-24
    • 104

      SERVER-67732 introduced shutting down Grid::getExecutorPool() as part of server shutdown as a way to fix memory leaks. However, this can cause a race condition where sharding components that use ScopedTaskExecutor may not be shut down before the parent executor, which makes us hit this invariant as part of server shutdown.

      Since having memory leaks during shutdown is more desired than crashing at shutdown, we should skip shutting down the sharding executor pool when TestProctor is enabled. This allows us to get the desired behavior in prod, while also having more manageable BF tracking for this issue since invariants are easier to track than memory leaks.

            Assignee:
            alex.li@mongodb.com Alex Li
            Reporter:
            jason.chan@mongodb.com Jason Chan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: