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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java:
##########
@@ -39,27 +37,18 @@ public class HFilePreadReader extends HFileReaderImpl {
   public HFilePreadReader(ReaderContext context, HFileInfo fileInfo, 
CacheConfig cacheConf,
     Configuration conf) throws IOException {
     super(context, fileInfo, cacheConf, conf);
+    cacheConf.getBlockCache()
+      .ifPresent(cache -> 
cache.waitForCacheInitialization(WAIT_TIME_FOR_CACHE_INITIALIZATION));
     // master hosted regions, like the master procedures store wouldn't have a 
block cache

Review Comment:
   This is still valid, and it's what we are doing in the check of line #44 
"cacheConf.getBlockCache().isPresent()". It's just that we don't need to the 
MutableBoolean anymore, since we don't need the check inside the Runnable.



-- 
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