[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: |
|
||||||||||||||||||||
| 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? |