[SERVER-32682] Allow AutoGet helpers to specify lock timeout Created: 12/Jan/18 Updated: 30/Oct/23 Resolved: 09/Feb/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Concurrency, Storage |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Eric Milkie | 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 | ||||||||
| Sprint: | Storage 2018-02-12 | ||||||||
| Participants: | |||||||||
| Description |
|
If a lock acquisition times out, the AutoGet constructor will uassert. |
| Comments |
| Comment by Githook User [ 09/Feb/18 ] |
|
Author: {'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}Message: |
| Comment by Githook User [ 09/Feb/18 ] |
|
Author: {'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}Message: |
| Comment by Githook User [ 09/Feb/18 ] |
|
Author: {'email': 'xiangyu.yao@mongodb.com', 'name': 'Xiangyu Yao', 'username': 'xy24'}Message: |
| Comment by Eric Milkie [ 12/Jan/18 ] |
|
Luckily, our timeout mechanism for Global lock already works that way, so there should be no problem extending the current timeout design to the AutoGet helpers. |
| Comment by Spencer Brody (Inactive) [ 12/Jan/18 ] |
|
It should also be possible to specify a timeout of 0, meaning that if there's any contention on the lock the acquisition fails immediately |