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

Remove excess read lock for NetworkToplogy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0, 3.1.4, 3.2.2
    • None
    • None

    Description

      getNumOfRacks() and getNumOfLeaves() are two high frequencies call methods for BlockPlacementPolicy, this two methods need to get NetworkTopology read lock, and get lock in high frequencies call methods may impact the namenode performance. 

      This two methods get number of racks and number of leaves just for chooseTarget calculate,  lock in these two methods cannot guarantee these two values will not change in the subsequent calculations.

      I think it's safe to remove the read lock from this two methods.

      Attachments

        1. HDFS-14523.1.patch
          1 kB
          Wu Weiwei

        Activity

          People

            wuweiwei Wu Weiwei
            wuweiwei Wu Weiwei
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: