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

add check for Global resource lock state to OperationContext::waitForConditionOrInterrupt()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Storage
    • Labels:

      Description

      It is generally an anti-pattern to be holding a lock on either the Global or RSTL resources when waiting on a condition variable through the.OperationContext.

      There is currently no programmatic way to enforce this convention, which has led to issues such as SERVER-48617, in IndexBuildsCoordinatorMongod::startIndexBuild().

      We should look into introducing in invariant to enforcing this convention for most usages of OperationContext as a condition variable. There will be a few exceptions to consider - one such case is in the LockManager's internal lock acquisition logic.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-execution Backlog - Storage Execution Team
              Reporter:
              benety.goh Benety Goh
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: