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

Ensure TenantMigrationRecipentService Fetcher instance survives future completion

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • 131

      The TenantMigrationRecipientService creates a Fetcher to retrieve files from the backup cursor used in the shard merge protocol. During shutdown of the PrimaryOnlyService, which means the captured shared pointer to the fetcher will also be destroyed, resulting in the destruction of the fetcher itself. This can result in deadlock during destruction when Fetcher::shutdown is called and tries to acquire the Fetcher mutex, which is already held by a previous Fetcher callback.

      The solution here is to ensure that the Fetcher instance survives future completion by making the Fetcher a std::unique_ptr member of the TenantMigrationRecipientService class.

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

              Created:
              Updated:
              Resolved: