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

MigrationManager signals the last migration for a namespace before freeing the collection dist lock

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.3.12
    • 3.3.12
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • Sharding 2016-08-29

    Description

      When the MigrationManager schedules multiple concurrent migrations for the same namespace, the first migration to be scheduled will acquire the collection distributed lock and the last one to complete will release it.

      Currently when the last scheduled migration completes, it signals the migration as complete to the caller before releasing the distributed lock, which causes a race condition where an immediately scheduled 'moveChunk' command fails because the lock is not released yet.

      We should switch the order so that the last notification is signaled only after the distributed lock has been released.

      Attachments

        Activity

          People

            kaloian.manassiev@mongodb.com Kaloian Manassiev
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: