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


##########
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:
   If I have to pass super.fileInfo, then we need to call initMetaAndIndex() on 
that. So, I thought that might disrupt the existing logic. Also, if I modify 
the HFileInfo state (the one we passed as an argument), it might come as a side 
effect, right?



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