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

Improve synchronization in BPOfferService with read write lock

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.6.0
    • datanode
    • None

    Description

      Threads in DN (DataXceiver, PacketResponder, Async disk worker etc) may block at BPOfferService.getBlockPoolId() when calling BPOfferService.checkBlock(), though they are just reading the same blockpool id. This is unnecessary overhead and may cause performance hit when many threads compete. Filing this jira to replace synchronized method with read write lock (ReentrantReadWriteLock).

      Attachments

        1. HDFS-6788.002.patch
          14 kB
          Yongjun Zhang
        2. HDFS-6788.001.patch
          14 kB
          Yongjun Zhang

        Activity

          People

            yzhangal Yongjun Zhang
            yzhangal Yongjun Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: