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

Incorrect check and message in FsDatasetImpl#invalidate

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.8.0, 3.0.0-alpha2
    • datanode
    • None
    • Improves the error message when datanode removes a replica which is not found.

    Description

      The following error check and message is incorrect, because info is null if (1) the block id does not exist in ReplicaMap or (2) the generation stamp of block does not match the replica entry in ReplicaMap.

      FsDatasetImpl#invalidate
             final ReplicaInfo info = volumeMap.get(bpid, invalidBlks[i]);
              if (info == null) {
                // It is okay if the block is not found -- it may be deleted earlier.
                LOG.info("Failed to delete replica " + invalidBlks[i]
                    + ": ReplicaInfo not found.");
                continue;
              }
              if (info.getGenerationStamp() != invalidBlks[i].getGenerationStamp()) {
                errors.add("Failed to delete replica " + invalidBlks[i]
                    + ": GenerationStamp not matched, info=" + info);
                continue;
              }
      

      Attachments

        1. HDFS-11018.001.patch
          2 kB
          Yiqun Lin
        2. HDFS-11018.002.patch
          3 kB
          Yiqun Lin
        3. HDFS-11018.003.patch
          3 kB
          Yiqun Lin

        Activity

          People

            linyiqun Yiqun Lin
            weichiu Wei-Chiu Chuang
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: