[SERVER-54818] Mitigate distributed lock acquisition unfairness Created: 26/Feb/21  Updated: 29/Oct/23  Resolved: 08/Mar/21

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

Type: Bug Priority: Major - P3
Reporter: Marcos José Grillo Ramirez Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-1, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
is caused by SERVER-53118 Make DistLock resilient to step downs... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 30

 Description   

After SERVER-53118 any operation waiting for a dist lock will wait for 20 seconds before returning a LockBusy error if couldn't acquire the lock. Additionally, notify all is being used when unlocking to wake up all waiting operations. If we have too many concurrent operations and they're taking too long, these two facts might end up starving a request. We should preserve the acquisition order using notify_one, and increase the timeout (for example to two hours).



 Comments   
Comment by Githook User [ 05/Mar/21 ]

Author:

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

Message: SERVER-54818 Mitigate distributed lock acquisition unfairness
Branch: master
https://github.com/mongodb/mongo/commit/08290a1e766326d83f6c2cbafe43b146a69969ae

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