[SERVER-21533] Lock manager is not fair in the presence of compatible requests which can be granted immediately Created: 18/Nov/15  Updated: 18/Mar/16  Resolved: 18/Nov/15

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: 3.0.7, 3.2.0-rc3
Fix Version/s: 3.0.8, 3.2.0-rc4

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

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Participants:
Linked BF Score: 0

 Description   

There is code in the lock manager, which attempts to increase system throughput in the case of long-running operations holding intent locks.

This code has the side effect of starving the 'strong' locks (S and X) when there is high load and an interleave of intents on the granted list, which is what would happen under a normal stream of requests. This has caused a bug where replication step down won't complete within the desired timeout.



 Comments   
Comment by Githook User [ 23/Nov/15 ]

Author:

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

Message: SERVER-21533 Lock manager should not starve requests

This change makes the lock manager granting code skip granting compatible
requests if the first entry on the queue is a conflict.

(cherry picked from commit f42a080cc0341d42ea5d5e42aa96366e0d952864)
Branch: v3.0
https://github.com/mongodb/mongo/commit/19b549b6c2731c4bf288a3cd477bc77e77e9efd3

Comment by Githook User [ 18/Nov/15 ]

Author:

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

Message: SERVER-21533 Lock manager should not starve requests

This change makes the lock manager granting code skip granting compatible
requests if the first entry on the queue is a conflict.
Branch: master
https://github.com/mongodb/mongo/commit/f42a080cc0341d42ea5d5e42aa96366e0d952864

Generated at Thu Feb 08 03:57:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.