Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-14268

Improve KeyLocker

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0, 1.3.0, 2.0.0
    • Component/s: util
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      1. In the implementation of KeyLocker it uses atomic variables inside a synchronized block, which doesn't make sense. Moreover, logic inside the synchronized block is not trivial so that it makes less performance in heavy multi-threaded environment.
      2. KeyLocker gives an instance of RentrantLock which is already locked, but it doesn't follow the contract of ReentrantLock because you are not allowed to freely invoke lock/unlock methods under that contract. That introduces a potential risk; Whenever you see a variable of the type RentrantLock, you should pay attention to what the included instance is coming from.

        Attachments

        1. 14268-V5.patch
          17 kB
          Ted Yu
        2. HBASE-14268.addendum.patch
          0.7 kB
          Yu Li
        3. HBASE-14268.patch
          8 kB
          Hiroshi Ikeda
        4. HBASE-14268-V2.patch
          8 kB
          Hiroshi Ikeda
        5. HBASE-14268-V3.patch
          11 kB
          Hiroshi Ikeda
        6. HBASE-14268-V4.patch
          17 kB
          Hiroshi Ikeda
        7. HBASE-14268-V5.patch
          17 kB
          Hiroshi Ikeda
        8. HBASE-14268-V5.patch
          17 kB
          Hiroshi Ikeda
        9. HBASE-14268-V6.patch
          18 kB
          Hiroshi Ikeda
        10. HBASE-14268-V7.patch
          18 kB
          Michael Stack
        11. HBASE-14268-V7.patch
          18 kB
          Michael Stack
        12. HBASE-14268-V7.patch
          18 kB
          Michael Stack
        13. HBASE-14268-V7.patch
          18 kB
          Hiroshi Ikeda
        14. HBASE-14268-V7.patch
          18 kB
          Hiroshi Ikeda
        15. HBASE-14268-V7.patch
          18 kB
          Hiroshi Ikeda
        16. HBASE-14268-V7.patch
          18 kB
          Hiroshi Ikeda
        17. KeyLockerIncrKeysPerformance.java
          1 kB
          Hiroshi Ikeda
        18. KeyLockerPerformance.java
          2 kB
          Hiroshi Ikeda
        19. ReferenceTestApp.java
          0.9 kB
          Hiroshi Ikeda

          Issue Links

            Activity

              People

              • Assignee:
                ikeda Hiroshi Ikeda
                Reporter:
                ikeda Hiroshi Ikeda
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: