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

Eliminate use of ThreadLocals for CoprocessorEnvironment bypass() and complete()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.92.0
    • Coprocessors
    • None
    • Reviewed

    Description

      In the current coprocessor framework, ThreadLocal objects are used for the bypass and complete booleans in CoprocessorEnvironment. This allows the *CoprocessorHost implementations to identify when to short-circuit processing the the preXXX and postXXX hook methods.

      Profiling the region server, however, shows that these ThreadLocals can become a contention point when on a hot code path (such as prePut()). We should refactor the CoprocessorHost pre/post implementations to remove usage of the ThreadLocal variables and replace them with locally scoped variables to eliminate contention between handler threads.

      Attachments

        1. cp_bypass.tar.gz
          20 kB
          Gary Helmling
        2. HBASE-3759.patch
          130 kB
          Gary Helmling

        Activity

          People

            ghelmling Gary Helmling
            ghelmling Gary Helmling
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: