Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11425 Cell/DBB end-to-end on the read-path
  3. HBASE-16738

L1 cache caching shared memory HFile block when blocks promoted from L2 to L1

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: regionserver, Scanners
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This is an issue when L1 and L2 cache used with combinedMode = false.
      See in getBlock

      if (victimHandler != null && !repeat) {
              Cacheable result = victimHandler.getBlock(cacheKey, caching, repeat, updateCacheMetrics);
      
              // Promote this to L1.
              if (result != null && caching) {
                cacheBlock(cacheKey, result, /* inMemory = */ false, /* cacheData = */ true);
              }
              return result;
            }
      

      When block is not there in L1 and have it in L2, we will return the block read from L2 and promote that block to L1 by adding it in LRUCache. But if the Block buffer is having shared memory (Off heap bucket cache for eg , we can not directly cache this block. The buffer memory area under this block can get cleaned up at any time. So we may get block data corruption.
      In such a case, we need to do a deep copy of the block (Including its buffer) and then add that to L1 cache.

        Attachments

        1. HBASE-16738.patch
          2 kB
          Anoop Sam John

          Activity

            People

            • Assignee:
              anoop.hbase Anoop Sam John
              Reporter:
              anoop.hbase Anoop Sam John

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment