[SERVER-68193] Sharding DDL coordinator can lock itself out in distlock retry loop Created: 20/Jul/22  Updated: 29/Oct/23  Resolved: 22/Jul/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.1, 5.0.11, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-57649 DDL coordinator dist lock acquisition... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.3, v5.0
Steps To Reproduce:

Insert this snippet similar to the one below here

               if (_failOnce && _recoveredFromDisk) {
                    _failOnce = false;
                    LOGV2(0, "REN: recovered from disk failing once");
                    uasserted(777777777, "intentional fail");
               }

and run resharding_disallow_drop.js

Sprint: Sharding EMEA 2022-07-25
Participants:
Linked BF Score: 149

 Description   

When the DDL coordinator acquires the local distlock, it stores it immediately to the member variable. However, if the acquisition of the non-local lock ends up asserting, it will keep the lock and try again. But when it retries, it won't be able to re-acquire the local dist lock because it is already taken earlier.



 Comments   
Comment by Githook User [ 22/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-68193 Sharding DDL coordinator can lock itself out in distlock retry loop

(cherry picked from commit 8293cd56410cb005b1f26d2102668aec66539be6)
Branch: v6.0
https://github.com/mongodb/mongo/commit/f3c90b51c62fe2eae5f9ea6a6fedcd57d32afc1a

Comment by Githook User [ 22/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-68193 Sharding DDL coordinator can lock itself out in distlock retry loop

(cherry picked from commit 8293cd56410cb005b1f26d2102668aec66539be6)
(cherry picked from commit aa7554e81cfc33887df92676eea4b91740bd9759)
Branch: v5.0
https://github.com/mongodb/mongo/commit/80eda720e188dc8d4847a3a5adfb7fd04d4be8cd

Comment by Githook User [ 21/Jul/22 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-68193 Sharding DDL coordinator can lock itself out in distlock retry loop
Branch: master
https://github.com/mongodb/mongo/commit/8293cd56410cb005b1f26d2102668aec66539be6

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