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

Remove unnecessary acquisition of mutex from access blocker registry method

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Server Serverless 2022-10-31, Server Serverless 2022-11-14
    • 128

      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.

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

              Created:
              Updated:
              Resolved: