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

Create opCtx outside of lock in oplog fetcher

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 5.0.3, 5.1.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • 156

    Description

      In the OplogFetcher, we should create the opCtx before we obtain the lock here.

      Since destructors are called in reverse order, the current code tries to destruct the opCtx when it goes out of scope before releasing the lock. This leads to a potential deadlock situation with tenant migrations.

      Attachments

        Activity

          People

            xuerui.fa@mongodb.com Xuerui Fa
            xuerui.fa@mongodb.com Xuerui Fa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: