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

checkNNStartup() need to be called when fsck calls FSNamesystem.getSnapshottableDirs()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha1
    • namenode
    • None
    • Reviewed

    Description

      I looked further at HDFS-9231 change I reviewed earlier, and realize I missed one thing.

      The patch changed

            if (snapshottableDirs != null) {
              SnapshottableDirectoryStatus[] snapshotDirs = namenode.getRpcServer()
                  .getSnapshottableDirListing();
              if (snapshotDirs != null) {
                for (SnapshottableDirectoryStatus dir : snapshotDirs) {
                  snapshottableDirs.add(dir.getFullPath().toString());
                }
              }
            }
      

      to

            if (snapshottableDirs != null) {
              snapshottableDirs = namenode.getNamesystem().getSnapshottableDirs();
            }
      

      In old code, namenode.getRpcServer().getSnapshottableDirListing() calls checkNNStartup(), however, this is not done with the new code. This is a hole of the earlier HDFS-9231 patch.

      Create this jira to fix the hole. Suggest to revert this portion of the change, and add code to do what we need at NamenodeFsck.

      Sorry for missing this in my earlier review of HDFS-9231.

      Thanks.

      Attachments

        1. HDFS-9351.patch
          3 kB
          Xiao Chen

        Issue Links

          Activity

            People

              xiaochen Xiao Chen
              yzhangal Yongjun Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: