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

LRU Block cache may not retain recently used blocks during eviction

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • BlockCache
    • None

    Description

      During block eviction, LRU block cache creates LruCachedBlockQueue and adds blocks from the Concurrent Hash Map (Cache) to identify the ones for retention. During the add , entries from the Cache (Hash map) are added to the queue without any check on the block access time until total size of blocks added to the queue reaches the max size for the queue. After the max size is reached, only blocks with access time greater than the access time of last block in the queue is added from "Cache" to the queue.

      But as path of Cache operation, when there is a cache hit the access time of the block is changed to the latest time. While iterating through Cache and adding blocks to the LruCachedBlockQueue, if the last element added when the queue size reached max has a access time greater than the rest of the blocks in Cache Hash Map, then remaining blocks will not be added to the queue to be considered for retention even though they have access time greater than other blocks added to the queue before the last one. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            gsbiju Biju Nair
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: