[DOCS-4594] Journal files behaviour description is misleading Created: 01/Jan/15  Updated: 30/Oct/23  Resolved: 07/Dec/15

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Bug Priority: Minor - P4
Reporter: Andrew Ryder (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 8 years, 12 weeks, 1 day ago

 Description   

http://docs.mongodb.org/manual/core/journaling/#journal-files

Journal files are append-only files and have file names prefixed with j._. When a journal file holds 1 gigabyte of data, MongoDB creates a new journal file. Once MongoDB applies all the write operations in a particular journal file to the database data files, it deletes the file, as it is no longer needed for recovery purposes. Unless you write many bytes of data per second, the journal directory should contain only two or three journal files.

MongoDB does not actively delete the journal files as the highlighted phrasing suggests. Instead, old journal files lie around until a new one is required. Given that the current one is guaranteed to still be in use at the time a new one is needed, at least two will persist at all times on any instance that has seen reasonable activity in it's current running lifetime.

The two latest journal files will stay around forever while the mongod is running even if you stop all writes. Only when a new journal file is required, are old ones (that are available) recycled for use as the new one.



 Comments   
Comment by Githook User [ 24/Nov/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4594 journal file reuse
Branch: v3.0
https://github.com/mongodb/docs/commit/199443bd10ea165302613cf8e41d105788192636

Comment by Githook User [ 24/Nov/15 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-4594 journal file reuse
Branch: master
https://github.com/mongodb/docs/commit/bd89cebbc863db660c53826adf40705e070f31dd

Generated at Thu Feb 08 07:48:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.