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

Fix BlockPlacementPolicyDefault#chooseTarget when avoiding stale nodes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 3.0.0-alpha1
    • Fix Version/s: 1.2.0, 2.0.3-alpha
    • Component/s: namenode
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      There's a bug in BlockPlacementPolicyDefault#chooseTarget with stale node avoidance enabled (HDFS-3912). If a NotEnoughReplicasException is thrown in the call to chooseRandom(), numOfReplicas is not updated together with the partial result in result since it is pass by value. The retry call to chooseTarget then uses this incorrect value.

      This can be seen if you enable stale node detection for TestReplicationPolicy#testChooseTargetWithMoreThanAvaiableNodes().

        Attachments

        1. hdfs-4351-branch-1-1.patch
          6 kB
          Andrew Wang
        2. hdfs-4351-4.patch
          4 kB
          Andrew Wang
        3. hdfs-4351-3.patch
          5 kB
          Andrew Wang
        4. hdfs-4351-2.patch
          4 kB
          Andrew Wang
        5. hdfs-4351.patch
          4 kB
          Andrew Wang

          Activity

            People

            • Assignee:
              andrew.wang Andrew Wang
              Reporter:
              andrew.wang Andrew Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: