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

Deadlock between signalDrainComplete and operations acquiring the FCV lock

    • Fully Compatible
    • ALL
    • v5.0
    • Repl 2021-06-28
    • 144

      ReplicationCoordinatorImpl::signalDrainComplete takes the RSTL lock in X mode first before acquiring the FCV lock for reconfig. Based on SERVER-33043, the FCV lock should be acquired before the global lock. I think this implies that the FCV lock should also be acquired before the RSTL lock. Because operation like this would take the FCV lock first before getting the global / RSTL locks. FixedFCVRegion has an invariant to check for that the global lock is not being held first. I think we should extend the invariant to check for RSTL lock as well.

            Assignee:
            jason.chan@mongodb.com Jason Chan
            Reporter:
            lingzhi.deng@mongodb.com Lingzhi Deng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: