[SERVER-73464] AutoGetCollectionForReadLockFree can leak lastApplied read source setting Created: 30/Jan/23 Updated: 29/Oct/23 Resolved: 01/Feb/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Henrik Edin | Assignee: | Henrik Edin |
| 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 | ||||
| Sprint: | Execution Team 2023-02-06 | ||||
| Participants: | |||||
| Linked BF Score: | 160 | ||||
| Description |
|
AutoGetCollectionForReadLockFree modifies the read source and sets it to lastApplied if needed. This setting is not restored at destruction or when the storage engine snapshot is closed. If we concurrently have become a writable primary this is problematic for any subsequent operation that doesn't use AutoGetCollectionForReadLockFree as we do not generally handle the lastApplied read source. |
| Comments |
| Comment by Githook User [ 01/Feb/23 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: AutoGetCollectionLockFree modifies the read source as needed but leaks the state which can cause issues for subsequent operations. This makes lastApplied a little different from the other read sources but is a first small step to always reset the read source when we close the storage engine transaction. |