[SERVER-4112] even with journaling on, there are cases when restarting will say "unclean shutdown use repair" Created: 21/Oct/11  Updated: 23/Feb/17  Resolved: 23/Feb/17

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

Type: Improvement Priority: Major - P3
Reporter: Antoine Girbal Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

The issue is that even with journaling on, there are times when mongod does not detect journal at restart:

  • from startup until 1 write is done to db
  • after an fsynclock until unlock and 1 write is done

This mean that if the database has unclean shutdown at that time, it will say "unclean shutdown use repair" at next start.
Also when restoring from a backup it will give the same error.
This is especially visible then doing backup with fsyncLock, since restoring from the backup will give the error.

This is only a usability issue since mongod.lock can be deleted safely.
The best solution seems to be to always make the journal look active when mongod uses journal.
fsyncLock should just update the lsn to point to the end of the journal, but not clear the whole journal.


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