[SERVER-63612] Trigger immediate drop of unfinished indexes during startup recovery Created: 14/Feb/22  Updated: 29/Oct/23  Resolved: 03/Jun/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-05-30, Execution Team 2022-06-13
Participants:

 Description   

During startup recovery after an unclean shutdown (i.e. it can't be resumed), we drop any incomplete-built indexes and rebuild them. When we drop these tables, we queue them for deletion, but we only run the reaper when the minimum of the oldest and checkpoint timestamps are advanced.

At this point in startup, we have not initialized replication, so we are not advancing the oldest or stable timestamps. We have started the checkpoint thread, but this also only runs every minute.

This can be problematic after an unclean shutdown due to running out of disk space during an index build. Because the table isn't dropped immediately, we end up with potentially very large files that can't be dropped until the next index build completes.



 Comments   
Comment by Githook User [ 03/Jun/22 ]

Author:

{'name': 'Dianna Hohensee', 'email': 'dianna.hohensee@mongodb.com', 'username': 'DiannaHohensee'}

Message: SERVER-63612 Execute second phase of two-phase index drop immediately for startup recovery / repair, rather than delay data deletion
Branch: master
https://github.com/mongodb/mongo/commit/ac3fb9e385775830b9f104c4cb0b7aff5554875d

Generated at Thu Feb 08 05:58:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.