[SERVER-47916] Out of order destruction of ValueHandles returned by InvalidatingLRUCache can break the invalidation guarantees Created: 04/May/20 Updated: 29/Oct/23 Resolved: 07/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 4.4.0-rc3 |
| Fix Version/s: | 4.4.0-rc7, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| 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.4
|
||||
| Sprint: | Sharding 2020-05-18 | ||||
| Participants: | |||||
| Description |
|
The destructor of InvalidatingLRUCache::StoredValue unconditionally removes entries from the _evictedCheckedOutValues map. This means it is possible that an old ValueHandle, which goes out of scope after a newer value for the same key has been evicted, will remove the newer value from that map. This in turn will prevent such a value from getting invalidated. The solution is to only erase from the _evictedCheckedOutValues if the StoredValue corresponds to the same epoch for the key. |
| Comments |
| Comment by Githook User [ 15/May/20 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: (cherry picked from commit 7ee768a17cbc78f42c8e8938df2c68635f871bdf) |
| Comment by Githook User [ 07/May/20 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: |