Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8031 Follow-on work for erasure coding phase I (striping layout)
  3. HDFS-9876

shouldProcessOverReplicated should not count number of pending replicas

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha1
    • erasure-coding, namenode
    • None
    • Reviewed

    Description

      Currently when checking if we should process over-replicated block in addStoredBlock, we count both the number of reported replicas and pending replicas. However, processOverReplicatedBlock chooses excess replicas only among all the reported storages of the block. So in a situation where we have over-replicated replica/internal blocks which only reside in the pending queue, we will not be able to choose any extra replica to delete.

      For contiguous blocks, this causes chooseExcessReplicasContiguous to do nothing. But for striped blocks, this may cause endless loop in chooseExcessReplicasStriped in the following while loop:

            while (candidates.size() > 1) {
              List<DatanodeStorageInfo> replicasToDelete = placementPolicy
                  .chooseReplicasToDelete(nonExcess, candidates, (short) 1,
                      excessTypes, null, null);
      

      Attachments

        1. HDFS-9876.000.patch
          4 kB
          Jing Zhao
        2. HDFS-9876.001.patch
          5 kB
          Jing Zhao
        3. HDFS-9876.001.patch
          5 kB
          Jing Zhao

        Activity

          People

            jingzhao Jing Zhao
            tfukudom Takuya Fukudome
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: