[SERVER-72571] ReservedTimes object not instantiated in global index observer Created: 05/Jan/23 Updated: 29/Oct/23 Resolved: 05/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Marcos José Grillo Ramirez | Assignee: | Marcos José Grillo Ramirez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-2583-Milestone-2 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Sharding EMEA 2023-01-09 | ||||||||
| Participants: | |||||||||
| Description |
|
The ReservedTimes class is a raii-type that on destruction makes sure there are no more times reserved for operations by observers. After SERVER-67123 a new observer was added for the global indexes catalog but it is missing the ReservedTimes object, which causes the following behavior: Suppose you have a command that executes any of the functions in the global index catalog API. These functions do some calls that might reserve some times and then they call the forementioned observer so by the time the function finishes, the reservedTimes vector might be holding some times. If later on in the same thread/opCtx, another function calls an observer (like for example, another write), then the insert observer will instantiate a ReservedTimes and that will hit the invariant protection the class have in the constructor. |
| Comments |
| Comment by Githook User [ 05/Jan/23 ] |
|
Author: {'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}Message: |