[SERVER-81333] Make the GlobalLock and DBLock RAII types aware of yields Created: 22/Sep/23  Updated: 06/Feb/24

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

Type: Improvement Priority: Minor - P4
Reporter: Josef Ahmad Assignee: Josef Ahmad
Resolution: Unresolved Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-79761 GlobalLock can segfault due to not ac... Closed
Assigned Teams:
Storage Execution EMEA
Sprint: CAR Team 2023-11-13, CAR Team 2023-11-27, CAR Team 2023-12-11, CAR Team 2023-12-25, CAR Team 2024-01-08, CAR Team 2024-01-22, CAR Team 2024-02-05, CAR Team 2024-02-19
Participants:

 Description   

Both classes expose an isLocked() method that returns true if the lock acquisition had succeeded during object construction.

These isLocked() methods are unaware of lock yields and return true even if the lock has been rescinded.
I am unaware of an existing bug due to this behaviour, however this has been a source of confusion when investigating SERVER-79761.

We should make these two methods aware of yields by having them consult the lock manager.


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