Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: datanode, namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      1.

      removeBlocks(collectedBlocks);
      

      should be after logSync, as we do in other FSN places (rename, delete, write with overwrite), the reason is discussed in HDFS-2815 and https://issues.apache.org/jira/browse/HDFS-6871?focusedCommentId=14110068&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14110068

      2.

      stat = FSDirStatAndListingOp.getFileInfo(dir, src, false,
          FSDirectory.isReservedRawName(src), true);
      

      We'd better to use dir.getAuditFileInfo, since it's only for audit log. If audit log is not on, we don't need to get the file info.

      3.
      In truncateInternal,

      INodeFile file = iip.getLastINode().asFile();
      

      is not necessary.

        Attachments

          Activity

            People

            • Assignee:
              hitliuyi Yi Liu
              Reporter:
              hitliuyi Yi Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: