Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
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.