Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3652

1.x: FSEditLog failure removes the wrong edit stream when storage dirs have same name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.0.3, 1.1.0
    • 1.0.4
    • namenode
    • None
    • Reviewed

    Description

      In FSEditLog.removeEditsForStorageDir, we iterate over the edits streams trying to find the stream corresponding to a given dir. To check equality, we currently use the following condition:

            File parentDir = getStorageDirForStream(idx);
            if (parentDir.getName().equals(sd.getRoot().getName())) {
      

      ... which is horribly incorrect. If two or more storage dirs happen to have the same terminal path component (eg /data/1/nn and /data/2/nn) then it will pick the wrong stream(s) to remove.

      Attachments

        1. hdfs-3652.txt
          2 kB
          Todd Lipcon

        Activity

          People

            tlipcon Todd Lipcon
            tlipcon Todd Lipcon
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: