Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-1978

Name-node should remove edits.new during startup rather than renaming it to edits.

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.13.1
    • Fix Version/s: 0.14.2, 0.15.0
    • Component/s: None
    • Labels:
      None

      Description

      Secondary name-node fails in the middle. The main name-node writes its journal transactions into edits.new at that time.
      If the name-node is shut down after that and restarted, then loadFSImage() reads current image file, merges it with the edits
      file and with the edits.new file.
      Now saveFSImage() saves new image file, creates empty edits file, and then calls rollFSImage(), which particularly renames
      edits.new into edits. This is a mistake, during startup edits.new should be merely removed after merging it with the image.
      The purpose of calling rollFSImage() during startups imho is to recover from an unsuccessful checkpoint. So an easy fix
      is to empty edits.new before calling rollFSImage the same as edits are emptied, then rollFSImage will rename empty file
      to empty which gives us the desired result.
      We should fix this bug both in 0.14 and 0.15. I make it a blocker for 0.15.

        Attachments

        1. editsNew-0-14.patch
          2 kB
          Konstantin Shvachko
        2. editsNew-0-15.patch
          4 kB
          Konstantin Shvachko

          Activity

            People

            • Assignee:
              shv Konstantin Shvachko
              Reporter:
              shv Konstantin Shvachko

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment