[SERVER-59500] DDL coordinators must not release dist locks on stepdown Created: 23/Aug/21  Updated: 29/Oct/23  Resolved: 27/Aug/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 5.0.0, 5.1.0
Fix Version/s: 5.0.4, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Pierlauro Sciarelli Assignee: Pierlauro Sciarelli
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.0
Sprint: Sharding EMEA 2021-09-06
Participants:
Linked BF Score: 134

 Description   

Upon stepping down, DDL coordinators are currently executing the onCompletion logic that includes the release of distributed locks.

This is not safe, as the following interleaving may happen:

Different approaches may be evaluated for solving the problem, for example:

  • Custom logic for coordinators to don't release distributed locks if a coordinator document still exists (may require a modification of the ScopedDistLock destructor)
  • Reason in a more general way: shall a node stepping down ever release distributed locks since all operations using a dist lock are going to be resumed by the new primary?


 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 20/Sep/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-59500 DDL coordinators must not release dist locks on stepdown
Branch: v5.0
https://github.com/mongodb/mongo/commit/48b25c07eea913522f47a435c985c8ba54a2381d

Comment by Githook User [ 27/Aug/21 ]

Author:

{'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}

Message: SERVER-59500 DDL coordinators must not release dist locks on stepdown
Branch: master
https://github.com/mongodb/mongo/commit/979ecf1842bb431badd5ad6b6025ac257742c684

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