[SERVER-50896] Startup cleans up non-existent Sorter temp file after failing to resume an index build. Created: 11/Sep/20  Updated: 29/Oct/23  Resolved: 14/Sep/20

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.8.0

Type: Bug Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-50431 Clean up persisted Sorter state if re... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2020-09-21
Participants:
Linked BF Score: 15

 Description   

When we fail to resume an index build, we remove the Sorter temporary files saved from the previous shutdown. However, if the index build was interrupted during the drain phase, we do not retain the Sorter temporary files or persist the filenames in the internal idents containing the resumable information for the interrupted index build. This may result in the cleanup code dereferencing an uninitialized boost::optional IndexSorterInfo::fileName field.



 Comments   
Comment by Githook User [ 14/Sep/20 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-50896 skip sorter cleanup if file name is not available

This is usually the case when the resuming an index build interrupted
during the drain phase.
Branch: master
https://github.com/mongodb/mongo/commit/80b2644f173442b5e132a8a3b515f4ab00b5b929

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