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

Release WiredTigerSessions that would prevent shutting down with new session cache shutdown policy

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Execution Team 2025-02-17

      The goal in SERVER-96701 is to create a new policy around the WiredTigerSessionCache shutting down wherein
      A) A WiredTigerSession cannot be checked out from the session cache while the cache is shutting down;
      B) The session cache cannot be shut down while a WiredTigerSession that has been checked out of the cache has not been returned to the cache

      The two places where we expect to shutdown the WiredTigerSessionCache are when we are performing a full clean shutdown, and when we are performing a rollback.

      There are some threads that can be running while we are shutting down the session cache. This is more-so the case during rollback than during shutdown. These threads may hold on to OperationContexts with recovery units that have WiredTigerSessions checked out from the session cache. With the new policy that we intend to implement in SERVER-96701, shutting down the session cache could not proceed until these sessions were released back into the session cache.

      The goal of this ticket is to try to find a way to prevent these threads from preventing session cache shutdown. This can involve either pausing/shutting down the thread during rollback and restarting it (the more extreme approach), or using the new API added in SERVER-97686 to otherwise release the session back into the cache.

      Some places that hold on to a WiredTigerSession during session cache shutdown:
      This operation context during shutdown

      The journal flusher thread while it is paused during rollback

      The OplogWriter which appears to keep running during rollback

      An FTDC collector which appears to keep running during rollback

            Assignee:
            damian.wasilewicz@mongodb.com Damian Wasilewicz
            Reporter:
            damian.wasilewicz@mongodb.com Damian Wasilewicz
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: