[SERVER-39106] GlobalLock acquisition should throw when ticket acquisition times out if there is a max lock timeout and no deadline Created: 18/Jan/19 Updated: 29/Oct/23 Resolved: 11/Feb/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.7, 4.1.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||
| Sprint: | Storage NYC 2019-02-11 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 69 | ||||||||||||||||
| Story Points: | 3 | ||||||||||||||||
| Description |
|
If global lock acquisition times out acquiring a ticket, then the constructor will not throw, but the resource will be unlocked. This leads to invariant failure when we attempt to acquire the global lock here then call canAcceptWritesForDatabase() here, which invariants that the lock is held here. If the caller did not provide a deadline, then they are not checking for lock acquisition failure, so the lock acquisition should throw. Consider applying the following patch:
|
| Comments |
| Comment by Githook User [ 17/Feb/19 ] |
|
Author: {'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}Message: (cherry picked from commit 691ab6da0c38f52f32c1028a8fa7447997ced255) |
| Comment by Githook User [ 11/Feb/19 ] |
|
Author: {'name': 'Xiangyu Yao', 'email': 'xiangyu.yao@mongodb.com', 'username': 'xy24'}Message: |
| Comment by Geert Bosch [ 22/Jan/19 ] |
|
Originally the rule was that you would be guaranteed to obtain the lock when not passing in a deadline. It seems that |