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

Nfs3Utils#getWccAttr() should check attr parameter against null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.4.0
    • nfs
    • None
    • Reviewed

    Description

      In RpcProgramNfs3#commit() :

            Nfs3FileAttributes postOpAttr = null;
            try {
              postOpAttr = writeManager.getFileAttr(dfsClient, handle, iug);
            } catch (IOException e1) {
              LOG.info("Can't get postOpAttr for fileId: " + handle.getFileId());
            }
            WccData fileWcc = new WccData(Nfs3Utils.getWccAttr(preOpAttr), postOpAttr);
      

      If there is exception, postOpAttr would be null.
      However, Nfs3Utils#getWccAttr() dereferences attr parameter directly.

      Attachments

        1. HDFS-5913.patch
          1.0 kB
          Brandon Li

        Activity

          People

            brandonli Brandon Li
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: