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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CombinedBlockCache.java:
##########
@@ -507,4 +507,18 @@ public int evictBlocksRangeByHfileName(String hfileName, 
long initOffset, long e
     return l1Cache.evictBlocksRangeByHfileName(hfileName, initOffset, 
endOffset)
       + l2Cache.evictBlocksRangeByHfileName(hfileName, initOffset, endOffset);
   }
+
+  @Override
+  public boolean waitForCacheInitialization(long timeout) {
+    return (this.l2Cache instanceof BucketCache)

Review Comment:
   Rather than assuming l1 would always be ready and adding BucketCache 
knowledge here, we should delegate the decision to both l1 and l2, like:
   `return this.l1Cache.waitForCacheInitialization(timeout) && 
this.l2Cache.waitForCacheInitialization(timeout);`



##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java:
##########
@@ -34,12 +34,14 @@
 public class HFilePreadReader extends HFileReaderImpl {
   private static final Logger LOG = 
LoggerFactory.getLogger(HFileReaderImpl.class);
 
+  private static final int WAIT_TIME_FOR_CACHE_INITIALIZATION = 120 * 60 * 
1000;

Review Comment:
   Could it take that long just to read the file and parse the protobuff 
content?



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