[SERVER-60639] TemporaryRecordStores should destruct by queueing themselves for dropping Created: 12/Oct/21 Updated: 29/Oct/23 Resolved: 25/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Louis Williams |
| 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: | Execution Team 2021-10-18, Execution Team 2021-11-01 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Our TemporaryRecordStore requires that callers “finalize” by dropping the table (excluding “keeping” it which is used by resumable index builds). The API is a bit clumsy because it requires callers to clean up by dropping the RS, which needs to be done under a Global lock. If this does not happen, the table gets leaked until the next restart. We can improve this API by allowing the destructor to queue up the drop with the drop-pending ident reaper and a 0 timestamp. This would reap the table immediately in the next pass (every second) and loosens the requirements for the calling operation in addition to making it less likely to leak resources. |
| Comments |
| Comment by Githook User [ 22/Oct/21 ] |
|
Author: {'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}Message: Users of TemporaryRecordStore no longer have to "finalize" by explicitly dropping the temporary table. Instead, tables are queued in the storage engine to be periodically dropped. All storage engines have the ability to support deferring ident drops. |