Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11860

removeUnneededJournalFiles assumes journal files exist, causing spurious warnings

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 2.5.4
    • MMAPv1, Storage
    • Storage Execution
    • ALL

    Description

      For files that are eligible, dur::Journal::removeUnneededJournalFiles() calls removeOldJournalFile to recycle/remove the journal file.

      However, in the meantime, another thread may have already done this, via dropDatabase or fsyncLock, both of which call

      • syncDataAndTruncateJournal
      • journalCleanup
      • Journal::cleanup
      • removeJournalFiles

      This causes removeOldJournalFile to spuriously complain about the missing journal file when it tries to rename/remove it, falsely suggesting that the journal file has been prematurely removed (either by mongod or by something else).

      A quick fix would be for removeOldJournalFile to simply check that the given path exists and short circuit return if not. That will still leave a brief TOCTTOU race, so it might be better to figure out a real/more appropriate fix.

      Attachments

        Activity

          People

            backlog-server-execution Backlog - Storage Execution Team
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: