Skip to content

Commit

Permalink
HBASE-27543 May be miss data when use mob
Browse files Browse the repository at this point in the history
  • Loading branch information
WenFeiYi committed Jan 30, 2023
1 parent 382681e commit 1666d58
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected static class FileDetails {
/** Earliest put timestamp if major compaction */
public long earliestPutTs = HConstants.LATEST_TIMESTAMP;
/** Latest put timestamp */
public long latestPutTs = HConstants.LATEST_TIMESTAMP;
public long latestPutTs = 0;
/** The last key in the files we're compacting. */
public long maxSeqId = 0;
/** Latest memstore read point found in any of the involved files */
Expand Down Expand Up @@ -216,8 +216,9 @@ private FileDetails getFileDetails(Collection<HStoreFile> 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={}{}",
Expand Down

0 comments on commit 1666d58

Please sign in to comment.