Bryan Beaudreault created HBASE-27233:
-----------------------------------------

             Summary: Read blocks into off-heap if caching is disabled for read
                 Key: HBASE-27233
                 URL: https://issues.apache.org/jira/browse/HBASE-27233
             Project: HBase
          Issue Type: Improvement
            Reporter: Bryan Beaudreault


Currently we decide whether a disk read {{shouldUseHeap}} based on three 
criteria:
 # If block cache is disabled, return false
 # If block cache is anything other than CombinedBlockCache, return true
 # Otherwise return false for DATA blocks and true for other blocks

The assumption here is we're making the decision based on which cache the block 
is likely to end up in. But if the read has caching disabled (i.e. 
setCacheBlocks(false)), it won't get into any cache. So we should return false 
in that case too.

The only caller to {{shouldUseHeap}} in HFileReaderImpl has a boolean 
{{cacheBlock}} available which determines if the read block should attempt to 
be cached. We can pass that boolean into the function. We should probably also 
account for cacheConf.shouldCacheBlockOnRead for the same reason.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to