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


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java:
##########
@@ -37,10 +37,15 @@ public class HFilePreadReader extends HFileReaderImpl {
   public HFilePreadReader(ReaderContext context, HFileInfo fileInfo, 
CacheConfig cacheConf,
     Configuration conf) throws IOException {
     super(context, fileInfo, cacheConf, conf);
+
     final MutableBoolean shouldCache = new MutableBoolean(true);
 
+    // Initialize HFileInfo object with metadata for caching decisions
+    HFileInfo hFileInfoForCaching = new HFileInfo(context, conf);
+    hFileInfoForCaching.initMetaAndIndex(this);

Review Comment:
   >Maybe use a boolean field in the HFileInfo to track whether 
initMetaAndIndex is done or not? 
   
   Yeah, I don't think there's another way.



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