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

Replications of the highest priority should be allowed to choose a source datanode that has reached its max replication limit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.23.5, 3.0.0-alpha1
    • 2.0.3-alpha, 0.23.6
    • namenode
    • None

    Description

      Blocks that have been identified as under-replicated are placed on one of several priority queues. The highest priority queue is essentially reserved for situations in which only one replica of the block exists, meaning it should be replicated ASAP.

      The ReplicationMonitor periodically computes replication work, and a call to BlockManager#chooseUnderReplicatedBlocks selects a given number of under-replicated blocks, choosing blocks from the highest-priority queue first and working down to the lowest priority queue.

      In the subsequent call to BlockManager#computeReplicationWorkForBlocks, a source for the replication is chosen from among datanodes that have an available copy of the block needed. This is done in BlockManager#chooseSourceDatanode.

      chooseSourceDatanode's job is to choose the datanode for replication. It chooses a random datanode from the available datanodes that has not reached its replication limit (preferring datanodes that are currently decommissioning).

      However, the priority queue of the block does not inform the logic. If a datanode holds the last remaining replica of a block and has already reached its replication limit, the node is dismissed outright and the replication is not scheduled.

      In some situations, this could lead to data loss, as the last remaining replica could disappear if an opportunity is not taken to schedule a replication. It would be better to waive the max replication limit in cases of highest-priority block replication.

      Attachments

        1. HDFS-4270-branch-0.23.patch
          6 kB
          Derek Dagit
        2. HDFS-4270-branch-0.23.patch
          10 kB
          Derek Dagit
        3. HDFS-4270.patch
          7 kB
          Derek Dagit
        4. HDFS-4270.patch
          7 kB
          Derek Dagit
        5. HDFS-4270.patch
          7 kB
          Derek Dagit
        6. HDFS-4270.patch
          11 kB
          Derek Dagit

        Activity

          People

            dagit Derek Dagit
            dagit Derek Dagit
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: