[SERVER-25610] MigrationManager signals the last migration for a namespace before freeing the collection dist lock Created: 15/Aug/16  Updated: 02/Sep/16  Resolved: 16/Aug/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.3.12
Fix Version/s: 3.3.12

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2016-08-29
Participants:

 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.



 Comments   
Comment by Githook User [ 16/Aug/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-25610 Signal last migration for a namespace after freeing the dist lock
Branch: master
https://github.com/mongodb/mongo/commit/0ba055e3c91654d564664a8665dc5ee3bcec72bf

Generated at Thu Feb 08 04:09:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.