Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4594

Journal files behaviour description is misleading

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • manual
    • None

    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.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 12 weeks, 1 day ago