[ 
https://issues.apache.org/jira/browse/HBASE-16651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15502814#comment-15502814
 ] 

ramkrishna.s.vasudevan commented on HBASE-16651:
------------------------------------------------

I remember when we handled this case of returning from victimHandler it was 
told that going forward the config of having combinedMode= false will be 
removed. And hence there is no need to do the return from victimHandler. Hence 
the change was removed from the patch that was committed. Is it better not to 
allow that victimHandler based config?
Not this patch
{code}
      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;
      }
{code}
A block from L2 is cached to L1. So when next time that block is fetched we 
read it from L1. Hope in our code (read path) we don't assume any where that 
since we get a block from L1 it can be surely treated as a EXCLUSIVE mode block?
One place to check is that prefetch executore in Storefile open where the 
blocks are read and we don't release the blocks. May be we are handling 
correctly. But pls check. 

> LRUBlockCache#returnBlock should try return block to Victim Handler L2 cache.
> -----------------------------------------------------------------------------
>
>                 Key: HBASE-16651
>                 URL: https://issues.apache.org/jira/browse/HBASE-16651
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>    Affects Versions: 2.0.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16651.patch
>
>
> In case of L1 and L2 cache usage with combinedMode = false, L2 is used as a 
> victim handler cache for L1 cache.  When a getBlock() request comes, L1 will 
> see if block is in it and if not it will try to provide the block from L2 
> cache. In such a case, the return block must return the block to L2 cache and 
> count down the ref count for the block.  But right now we just ignore the 
> returnBlock call in LRUCache



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to