[SERVER-61689] ActiveMigrationsRegistry::lock method doesn't properly handle its exceptions Created: 22/Nov/21  Updated: 29/Oct/23  Resolved: 29/Nov/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.2.0, 5.1.2, 5.0.6, 4.4.11

Type: Bug Priority: Major - P3
Reporter: Sergi Mateo Bellido Assignee: Sergi Mateo Bellido
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1, v5.0, v4.4
Sprint: Sharding EMEA 2021-11-29
Participants:
Linked BF Score: 146

 Description   

if the operation context is interrupted at this point, the thread that was executing that code will throw an exception. However, the ActiveMigrationsRegistry will still think that it is locked because _migrationsBlocked is true, so no one else will be able to acquire the ActiveMigrationsRegistry lock anymore.



 Comments   
Comment by Githook User [ 29/Nov/21 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-61689 Fixing ActiveMigrationsRegistry::lock function

(cherry picked from commit 6ef5c857adb8b4d7cee17581c15803558320108d)

with minor modifications

(cherry picked from commit 4809284f259526f8449bab4d8ee774810ecc90e9)
Branch: v4.4
https://github.com/mongodb/mongo/commit/5510a946ad18fc4d91d31ddf06d2d96e7c7ad1de

Comment by Githook User [ 29/Nov/21 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-61689 Fixing ActiveMigrationsRegistry::lock function

(cherry picked from commit 6ef5c857adb8b4d7cee17581c15803558320108d)

with minor modifications
Branch: v5.0
https://github.com/mongodb/mongo/commit/4809284f259526f8449bab4d8ee774810ecc90e9

Comment by Githook User [ 29/Nov/21 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-61689 Fixing ActiveMigrationsRegistry::lock function

(cherry picked from commit 6ef5c857adb8b4d7cee17581c15803558320108d)
Branch: v5.1
https://github.com/mongodb/mongo/commit/1ae5f8550cabfe93f4cf6a920a5eaa01178fee94

Comment by Githook User [ 26/Nov/21 ]

Author:

{'name': 'Sergi Mateo Bellido', 'email': 'sergi.mateo-bellido@mongodb.com', 'username': 'smateo'}

Message: SERVER-61689 Fixing ActiveMigrationsRegistry::lock function
Branch: master
https://github.com/mongodb/mongo/commit/6ef5c857adb8b4d7cee17581c15803558320108d

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