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

Remove unnecessary acquisition of mutex from access blocker registry method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.2.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2022-10-31, Server Serverless 2022-11-14
    • 128

    Description

      TenantMigrationAccessBlockerRegistry::getAsyncBlockingOperationsExecutor() currently attempts to acquire the registry mutex in order to access _asyncBlockingOperationsExecutor. This can lead to a deadlock with TenantMigrationRecipientAccessBlocker or TenantMigrationDonorAccessBlocker, since these classes call back into the registry. Ideally, we should avoid calling back into the registry from members of the registry, but refactoring this and moving _asyncBlockingOperationsExecutor is non-trivial at this point. Instead, since _asyncBlockingOperationsExecutor is created when the registry is instantiated and reset only when it is shut down/destroyed, we can avoid synchronization entirely for this executor.

      Attachments

        Activity

          People

            christopher.caplinger@mongodb.com Christopher Caplinger
            christopher.caplinger@mongodb.com Christopher Caplinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: