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

Fix BlockPlacementPolicyDefault#chooseTarget when avoiding stale nodes

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0, 3.0.0-alpha1
    • 1.2.0, 2.0.3-alpha
    • namenode
    • None
    • 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.patch
          4 kB
          Andrew Wang
        2. hdfs-4351-2.patch
          4 kB
          Andrew Wang
        3. hdfs-4351-3.patch
          5 kB
          Andrew Wang
        4. hdfs-4351-4.patch
          4 kB
          Andrew Wang
        5. hdfs-4351-branch-1-1.patch
          6 kB
          Andrew Wang

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment