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


##########
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:
   ok, I will remove the check here. The intention was to keep the old 
behaviour when the feature is disabled.



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