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

Investigate if there's a lock ordering issue in ReplicaSetNodeProcessInterface

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • QE 2025-02-17, QE 2025-03-03

      As part of SERVER-99150 we've implemented a lock ordering checker. It detected a conflict in ReplicaSetNodeProcessInterface::getWriteSizeEstimator.

      During the execution of the code we acquire the RSTL lock to check if we can write locally. This happens whenever we instantiate a DocumentSourceWriter class ($out and $merge).

      However, this call may occur after having acquired the Global lock, which is always taken after having acquired the RSTL lock in the hierarchy.

      As we're potentially taking the RSTL lock out of order with respect to other operations we should investigate if this can be refactored to stay in line with the other operations and avoid taking the RSTL lock altogether.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: