[SERVER-48972] Keep track of waiting resource in LockerImpl Created: 18/Jun/20  Updated: 29/Oct/23  Resolved: 23/Jun/20

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

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Gregory Noma
Resolution: Fixed Votes: 0
Labels: thread-sanitizer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-48964 Potential data race in LockRequest.st... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-06-29
Participants:
Linked BF Score: 0

 Description   

LockerImpl::getWaitingResource() has unsynchronized accesses to the lock request status in order to find the waiting resource. To solve this, LockerImpl should keep track of the waiting resource itself so that it doesn't need to look through the pending requests.



 Comments   
Comment by Githook User [ 23/Jun/20 ]

Author:

{'name': 'Gregory Noma', 'email': 'gregory.noma@gmail.com', 'username': 'gregorynoma'}

Message: SERVER-48972 Keep track of waiting resource in LockerImpl
Branch: master
https://github.com/mongodb/mongo/commit/56d94a679860c827f8f442675193b9ee2f4d4c49

Comment by Louis Williams [ 18/Jun/20 ]

This might be a dupe of, or similar to SERVER-48964. I'm not completely sure about the prescribed solution here, because the locker should be able to read its own LockRequests without extra synchronization. That said, getWaitingResource seems to be mostly used in debug assertions and unit tests.

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