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

Improve synchronization in BPOfferService with read write lock

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.6.0
    • Component/s: datanode
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: