jhungund commented on code in PR #5856:
URL: https://github.com/apache/hbase/pull/5856#discussion_r1582729929


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePreadReader.java:
##########
@@ -40,8 +41,13 @@ public HFilePreadReader(ReaderContext context, HFileInfo 
fileInfo, CacheConfig c
 
     final MutableBoolean shouldCache = new MutableBoolean(true);
 
-    // Initialize HFileInfo object with metadata for caching decisions
-    fileInfo.initMetaAndIndex(this);
+    DataTieringManager dataTieringManager = DataTieringManager.getInstance();
+    if (dataTieringManager != null) {
+      // Initialize HFileInfo object with metadata for caching decisions.
+      // Initialize the metadata only if the data-tiering is enabled.
+      // If not, the metadata will be initialized later.
+      fileInfo.initMetaAndIndex(this);
+    }

Review Comment:
   This check is to avoid any changes to the old functionality. We had observed 
that this line does introduce some performance regression leading to a unit 
test failure. We keep the old behaviour to initialise the metadata at the 
original location when data-tiering is not enabled.



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