[SERVER-37479] report amount of time that a locker blocks other acquirers Created: 04/Oct/18  Updated: 08/Jun/21  Resolved: 12/May/20

Status: Closed
Project: Core Server
Component/s: Concurrency, Diagnostics
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Geert Bosch Assignee: Geert Bosch
Resolution: Won't Do Votes: 1
Labels: SWDI
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-53180 Log each operation that holds a lock ... Closed
Participants:
Case:

 Description   

Currently we report how long threads waited to acquire locks, but it is harder to find the reason why the lock wasn't granted. By adding statistics on how long a locker holds a lock while blocking other threads, we could surface problematic lockers.

This should be straightforward to implement, because we already have the appropriate lock manager bucket locked when queuing the request, so we can just add a start block time to the granted request.



 Comments   
Comment by Geert Bosch [ 12/May/20 ]

We decided to not implement this feature for the following reasons:

  • This ticket is trickier to implement than initially expected.
  • This ticket would only give blocking information after the operation holding the lock has finished, while trouble shooting problems generally need to know what is currently blocking an operation. For this purpose we have added more locking information to currentOp and lockInfo commands.
  • The same people that would add this additional diagnostics info are currently working on removing locks. We think it is more valuable to remove locks from readers than to add additional diagnostics to deal with these long-running readers holding locks.
Comment by Connie Chen [ 11/May/20 ]

geert.bosch Could you give an overview of the work effort needed to complete this?

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