[SERVER-77131] Remove and ban any write to collection instance in commit handlers Created: 15/May/23 Updated: 29/Oct/23 Resolved: 11/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.2.0-rc0 |
| Type: | Improvement | 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: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Storage Execution NAMER
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Execution Team 2023-06-12, Execution NAMR Team 2023-06-26, Execution NAMR Team 2023-10-02, Execution NAMR Team 2023-10-16 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
It is not safe to write to collection or index catalog entry instances in commit handlers. Cloned instances as part of DDL operations can be returned to other threads doing lock-free reads after the DDL operation is committed to the storage engine but before its commit handlers have run. Any such write requires synchronization and goes against the design philosophy that readers should obtain immutable instances that are fully in sync with the opened storage snapshot. To help find and prevent future misuse we should consider publishing new collection instances in the first commit handler rather than the last. |
| Comments |
| Comment by Githook User [ 11/Oct/23 ] |
|
Author: {'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}Message: An index that is marked ready in the index catalog can no longer be marked as dropped. |
| Comment by Githook User [ 28/Jul/23 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: |