This is an automated email from the ASF dual-hosted git repository.

wchevreuil pushed a commit to branch HBASE-29427
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 5037c169f918499994c6b7ef0d3820f33822d37b
Author: Wellington Ramos Chevreuil <[email protected]>
AuthorDate: Fri Jun 27 23:04:05 2025 +0100

    HBASE-28463 Rebase time based priority branch (HBASE-28463) with latest 
master (and fix conflicts)
    
    Change-Id: I0704c8f060d06c9dc7b43d8d7c81a3274d8fd333
---
 .../src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java    | 3 ++-
 .../main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java    | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
index 3fcf75b3970..72ca37c0557 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/CacheConfig.java
@@ -282,7 +282,8 @@ public class CacheConfig implements 
PropagatingConfigurationObserver {
   public boolean shouldCacheBlockOnRead(BlockCategory category, HFileInfo 
hFileInfo,
     Configuration conf) {
     Optional<Boolean> cacheFileBlock = Optional.of(true);
-    if (getBlockCache().isPresent()) {
+    // For DATA blocks only, if BuckeCache is in use, we don't need to cache 
block again
+    if (getBlockCache().isPresent() && category.equals(BlockCategory.DATA)) {
       Optional<Boolean> result = 
getBlockCache().get().shouldCacheFile(hFileInfo, conf);
       if (result.isPresent()) {
         cacheFileBlock = result;
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
index cea5c0361f4..7e3a415d7d7 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java
@@ -921,7 +921,7 @@ public class HFileWriterImpl implements HFile.Writer {
    * to include the timestamp of this key
    */
   private void trackTimestamps(final ExtendedCell cell) {
-    if (Cell.Type.Put == cell.getType()) {
+    if (KeyValue.Type.Put == KeyValue.Type.codeToType(cell.getTypeByte())) {
       earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp());
     }
     timeRangeTracker.includeTimestamp(cell);

Reply via email to