[SERVER-7861] Add marker file for journaling to ensure a clean restart Created: 06/Dec/12  Updated: 06/Dec/22  Resolved: 14/Sep/18

Status: Closed
Project: Core Server
Component/s: MMAPv1, Stability, Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-19778 Mongod recovery fails after power cyc... Closed
Related
is related to SERVER-8358 "Move chunk commit failed" shutdown l... Closed
is related to SERVER-19707 A crash after dropDatabase leaves the... Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

When the journal files are wiped/truncated, like during fsync+lock, a marker file should be written so if a backup is made, or the server crashes, the server can automatically restart instead of complaining about a lock file but no journal files.

There are many cases where this happens, like dropDatabase, moveChunk, and repair.

This may be MMapV1 specific.



 Comments   
Comment by Scott Hernandez (Inactive) [ 19/Jun/13 ]

Yes, we flush all databases and delete the journal files.

See the syncDataAndTruncateJournal function call in FSyncLockThread::doRealWork. This is also done when dropping a database or doing a repair (to any database).

Comment by Eric Milkie [ 08/Mar/13 ]

How does this process currently work – do we delete the journal files and then preallocate them again, as part of the fsync command?

Generated at Thu Feb 08 03:15:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.