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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Won't Do
    • None
    • None
    • Storage
    • Execution Team 2021-11-01, Execution Team 2021-11-15, Execution Team 2021-12-27, Execution Team 2022-01-10, Execution Team 2022-01-24

    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

              dianna.hohensee@mongodb.com Dianna Hohensee
              benety.goh@mongodb.com Benety Goh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: