From eae0c46e2b5fa3a061f2fc8dd140f0e1021c5668 Mon Sep 17 00:00:00 2001 From: WenFeiYi Date: Wed, 21 Dec 2022 20:25:07 +0800 Subject: [PATCH] HBASE-27543 May be miss data when use mob --- .../hadoop/hbase/regionserver/compactions/Compactor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java index bd9ce6035ad4..67e338f0b96d 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java @@ -216,8 +216,9 @@ private FileDetails getFileDetails(Collection filesToCompact, boolea } } tmp = fileInfo.get(TIMERANGE_KEY); - fd.latestPutTs = + long latestPutTs = tmp == null ? HConstants.LATEST_TIMESTAMP : TimeRangeTracker.parseFrom(tmp).getMax(); + fd.latestPutTs = Math.max(fd.latestPutTs, latestPutTs); LOG.debug( "Compacting {}, keycount={}, bloomtype={}, size={}, " + "encoding={}, compression={}, seqNum={}{}",