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

renameCollectionAndDropTarget() should check for background operations before calling preRenameCollection()

    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-05-18
    • 38

      This is related to a build failure on non-document level locking storage engines.

      The call to OpObserver::preRenameCollection here will get the locks on the Oplog and maintain them during the duration of the WriteUnitOfWork. The check for assertNoIndexBuildInProgForCollection() requires the IndexBuildsCoordinator _mutex. But if we have an operation that is already holding the _mutex and is waiting for the Oplog locks, we will deadlock.

      To solve this, we should check for background operations prior to calling preRenameCollection().

            Assignee:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: