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

Assert that unkillable operations that take X collection locks do not hold the RSTL

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • Execution Team 2022-12-12, Execution Team 2022-12-26, Execution Team 2023-01-09

      The deadlocks described in SERVER-71191 and SERVER-44722 are caused because the following conditions are true, in general

      • An operation is unkillable by stepdown
      • While holding the RSTL in IX mode, an operation takes an X collection lock. If there are any prepared transactions, this blocks.
      • The stepdown thread tries to acquire the X lock, but blocks because of a conflict

      In this situation, the operation that isn't interrupted by stepdown does not make progress. We should add an assertion to our lock helpers that prevent unkillable operations from taking X locks while also holding the RSTL.

        1. diff.patch
          12 kB
          Jordi Olivares Provencio

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: