kadirozde commented on code in PR #5545:
URL: https://github.com/apache/hbase/pull/5545#discussion_r1545755759


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFileWriter.java:
##########
@@ -256,156 +234,571 @@ public void appendMobMetadata(SetMultimap<TableName, 
String> mobRefSet) throws I
   public void appendTrackedTimestampsToMetadata() throws IOException {
     // TODO: The StoreFileReader always converts the byte[] to TimeRange
     // via TimeRangeTracker, so we should write the serialization data of 
TimeRange directly.
-    appendFileInfo(TIMERANGE_KEY, 
TimeRangeTracker.toByteArray(timeRangeTracker));
-    appendFileInfo(EARLIEST_PUT_TS, Bytes.toBytes(earliestPutTs));
+    liveFileWriter.appendTrackedTimestampsToMetadata();
+    if (historicalFileWriter != null) {
+      historicalFileWriter.appendTrackedTimestampsToMetadata();
+    }
   }
 
   /**
    * Record the earlest Put timestamp. If the timeRangeTracker is not set, 
update TimeRangeTracker
    * to include the timestamp of this key
    */
   public void trackTimestamps(final Cell cell) {
-    if (KeyValue.Type.Put.getCode() == cell.getTypeByte()) {
-      earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp());
+    liveFileWriter.trackTimestamps(cell);

Review Comment:
   The delete code here is moved to SingleStoreFileWriter#trackTimestamps(). So 
the behavior did not change. 
   `    private void trackTimestamps(final Cell cell) {
         if (KeyValue.Type.Put.getCode() == cell.getTypeByte()) {
           earliestPutTs = Math.min(earliestPutTs, cell.getTimestamp());
         }
         timeRangeTracker.includeTimestamp(cell);
       }`



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