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

Make sure that an FSync command cannot race with shutdown tasks and restart the FSyncLockThread

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution

      Whether or not this is an issue was being discussed in the PR for SERVER-70444, which is fixing a different problem. From the PR discussion:

      "It looks like exitCleanly(code) is the entry point for shutdown, and it calls this shutdown() function that invariants globalInShutdownDeprecated(), and then runs the shutdown tasks. Grepping around for `globalInShutdownDeprecated()`, I see it in the connpoon.cpp code. So I don't think new connections can get in, but an already existing one with perfect timing.... probably could."

      My recommendation, if confirmed this is an issue, would be to add a globalInShutdownDeprecated() checks in the FSync code after taking a mutex that excludes other fsync operations from making changes (like the shutdown logic).

       

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: