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

Close the L1 victim handler race

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.5.4
    • 2.6.0, 3.0.0-alpha-4, 2.5.5
    • BlockCache
    • None
    • Reviewed

    Description

      When we evict a block from L1 and move it to L2 there is a brief window of time where we have removed the block from the L1 map and yet the victim handler has not completed execution. Some read-your-write use cases can be significantly impacted even though the window is small. Imagine a use case where PRELOAD_DATA_ON_OPEN and CACHE_DATA_ON_WRITE are both enabled to warm cache ahead of access and any miss can be problematic. Perhaps a particularly latency sensitive case with HFiles backed by S3.

      Victim handling can be made atomic with respect to the unmapping operation with ConcurrentHashMap#computeIfPresent. The upside is there will be no L1+L2 misses during the transition. The downside is if the victim handler takes a long time to execute – currently they are all very fast, so only a theoretical risk – then other removals or insertions in L1 can block until it completes.

      Attachments

        Issue Links

          Activity

            People

              apurtell Andrew Kyle Purtell
              apurtell Andrew Kyle Purtell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: