You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/03/28 16:49:20 UTC

[GitHub] [hudi] yihua commented on a change in pull request #5149: [WIP][HUDI-3721] Allow rollback of commits before metadata table initialization

yihua commented on a change in pull request #5149:
URL: https://github.com/apache/hudi/pull/5149#discussion_r836641681



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java
##########
@@ -504,9 +504,11 @@ private boolean initializeFromFilesystem(HoodieTableMetaClient dataMetaClient,
     }
 
     // If there is no commit on the dataset yet, use the SOLO_COMMIT_TIMESTAMP as the instant time for initial commit
-    // Otherwise, we use the timestamp of the latest completed action.
+    // Otherwise, we use the timestamp of the latest completed action with the suffix "000".
     String createInstantTime = dataMetaClient.getActiveTimeline().filterCompletedInstants()
-        .getReverseOrderedInstants().findFirst().map(HoodieInstant::getTimestamp).orElse(SOLO_COMMIT_TIMESTAMP);
+        .getReverseOrderedInstants().findFirst().map(HoodieInstant::getTimestamp)
+        .map(timestamp -> timestamp + HoodieTableMetadata.METADATA_TABLE_INIT_TIMESTAMP_SUFFIX)

Review comment:
       Yes.  This PR is more like a minimal fix to get rollback/restore work before the release cut.




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org