Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-3652

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.0.3, 1.1.0
    • Fix Version/s: 1.0.4
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      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.

      1. hdfs-3652.txt
        2 kB
        Todd Lipcon

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Todd Lipcon
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development