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

Improve synchronization in BPOfferService with read write lock

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

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

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment