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

Investigate better solutions for fixing the deadlock issue in profiling

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • Execution Team 2022-05-02, Execution Team 2022-05-16, Execution Team 2022-10-03, Execution Team 2022-10-17, Execution Team 2022-10-31, Execution Team 2022-11-14, Execution Team 2022-12-12, Execution Team 2022-11-28
    • 145

      SERVER-59226 discovered a deadlock issue between the profiling operation and the replication state change. This ticket is created to investigate other proposed solutions that are more generic and Execution involved to remove the layer violation introduced in the original fix. One of the proposed solution is to avoid acquiring RSTL lock for profile(), or to be more generic, for all non-replicated writes. We should first investigate if RSTL acquisition can be safely removed for non-replicated writes and figure out how to remove it, probably by using a new RAII type. Another solution is to do profile in a separate thread or a dedicated thread pool. This approach may need async work queues and we need to investigate what to do when there are more profile requests than what can be fit into the queue. Also as a follow up, we might want to examine UninterruptibleLockGuard use cases and see if that can be improved since we recently saw and increasing number of issues because of that.  

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            wenbin.zhu@mongodb.com Wenbin Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: