wchevreuil commented on code in PR #5905:
URL: https://github.com/apache/hbase/pull/5905#discussion_r1607171526


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileReaderImpl.java:
##########
@@ -1357,9 +1357,10 @@ public HFileBlock readBlock(long dataBlockOffset, long 
onDiskBlockSize, final bo
         BlockType.BlockCategory category = 
hfileBlock.getBlockType().getCategory();
         final boolean cacheCompressed = 
cacheConf.shouldCacheCompressed(category);
         final boolean cacheOnRead = cacheConf.shouldCacheBlockOnRead(category);
+        final boolean shouldCacheFileBlock = 
cacheConf.shouldCacheFileBlock(getHFileInfo(), conf);
 
         // Don't need the unpacked block back and we're storing the block in 
the cache compressed
-        if (cacheOnly && cacheCompressed && cacheOnRead) {
+        if (cacheOnly && cacheCompressed && cacheOnRead && 
shouldCacheFileBlock) {

Review Comment:
   Still in the same line of my previous comments: why do we need these two 
separate booleans (cacheOnRead && shouldCacheFileBlock) here? We should merge 
the data tiering logic inside shouldCacheBlockOnRead and deal with a single 
boolean variable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to