HBase
  1. HBase
  2. HBASE-3587

Eliminate use of ReadWriteLock in RegionObserver coprocessor invocation

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.92.0
    • Component/s: Coprocessors
    • Labels:
      None

      Description

      Follow-up to a discussion on the dev list: http://search-hadoop.com/m/jOovV1uAJBP

      The CoprocessorHost ReentrantReadWriteLock is imposing some overhead on data read/write operations, even when no coprocessors are loaded. Currently execution of RegionCoprocessorHost pre/postXXX() methods are guarded by acquiring the coprocessor read lock. This is used to prevent coprocessor registration from modifying the coprocessor collection while upcall hooks are in progress.

      On further discussion, and looking at the locking in HRegion, it should be sufficient to just use a CopyOnWriteArrayList for the coprocessor collection. We can then remove the coprocessor lock and eliminate the associated overhead without having to special case the "no loaded coprocessors" condition.

      1. HBASE-3587.patch
        72 kB
        Gary Helmling

        Activity

        Gary Helmling made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.92.0 [ 12314223 ]
        Resolution Fixed [ 1 ]
        Gary Helmling made changes -
        Attachment HBASE-3587.patch [ 12475647 ]
        Gary Helmling made changes -
        Field Original Value New Value
        Assignee Gary Helmling [ ghelmling ]
        Gary Helmling created issue -

          People

          • Assignee:
            Gary Helmling
            Reporter:
            Gary Helmling
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development