You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/12/10 10:14:13 UTC

[GitHub] [hbase] ramkrish86 commented on a change in pull request #919: HBASE-23066 Allow cache on write during compactions when prefetching is

ramkrish86 commented on a change in pull request #919: HBASE-23066 Allow cache on write during compactions when prefetching is
URL: https://github.com/apache/hbase/pull/919#discussion_r355949650
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
 ##########
 @@ -1118,9 +1118,9 @@ public StoreFileWriter createWriterInTmp(long maxKeyCount, Compression.Algorithm
       boolean shouldDropBehind) throws IOException {
     final CacheConfig writerCacheConf;
     if (isCompaction) {
-      // Don't cache data on write on compactions.
+      // Don't cache data on write on compactions, unless specifically configured to do so
       writerCacheConf = new CacheConfig(cacheConf);
-      writerCacheConf.setCacheDataOnWrite(false);
+      writerCacheConf.setCacheDataOnWrite(cacheConf.shouldCacheCompactedBlocksOnWrite());
 
 Review comment:
   Good point. Currently if cacheDAtaOnWrite is true, still the cacheBloomOnWrite and cacheIndexOnWrite can be false. So may be if cacheDataOnWrite is true we should make the other two also as true? And this to happen even durng flushes and not only compactions? Just discussed with @anoopsjohn  offline and if needed we can do this in another JIRA. @chenxu14  - your thoughts?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services