[SERVER-61537] Delete WiredTigerPreplog and WiredTigerTmpLog files instead of moving them in the InitialSyncFileMover Created: 16/Nov/21  Updated: 29/Oct/23  Resolved: 18/Nov/21

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

Type: Task Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Matthew Russotto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-61536 Treat WiredTiger journal directory sp... Closed
Backwards Compatibility: Fully Compatible
Sprint: Replication 2021-11-29
Participants:

 Description   

WiredTiger owns the file space of any file with the WiredTiger prefix and often only look for prefixes rather than entire filenames when manipulating files. Our current implementation of renaming files that already exist in the dbpath and then moving them causes issues for WiredTigerPrepLog and WiredTigerTmpLog files as a result.

One such issue happens when a PrepLog file was renamed before initial sync files were moved, but WT tries to delete the PrepLog file twice (because of its use of prefixes and extracting the log number from the file).



 Comments   
Comment by Githook User [ 17/Nov/21 ]

Author:

{'name': 'Matthew Russotto', 'email': 'matthew.russotto@mongodb.com', 'username': 'mtrussotto'}

Message: SERVER-61537 Delete WiredTigerPreplog and WiredTigerTmpLog files instead of moving them in the InitialSyncFileMover
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/6faf91f9646dd7d2886e78e60540856a4ec6f067

Comment by Samyukta Lanka [ 16/Nov/21 ]

From SERVER-61536:

Normally we completely replace the WiredTiger 'journal' directory when doing a File Copy Based Initial Sync. If that directory is a symlink (as it is in our perf infrastructure) we instead copy and delete files within it. Because of some WiredTiger issues, we need to treat this directory in a special way. All files prefixed with WiredTigerLog must be deleted (even if they didn't appear in the backup cursor), since a new log file may have been created when we shut down. All files prefixed with WiredTigerPreplog or WiredTigerTmplog should not be moved from the .initialsync directory to the dbpath, as these files will be deleted by WiredTiger anyway. If we do move such a file, and a corresponding file already exists, we must delete it rather than rename it to a temporary name, because WiredTiger will fail with a fatal error if any files prefixed with a log prefix exist which do not match its naming scheme.

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