nsivabalan commented on code in PR #9546:
URL: https://github.com/apache/hudi/pull/9546#discussion_r1313693872
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1282,13 +1284,14 @@ public static Set<String>
getValidInstantTimestamps(HoodieTableMetaClient dataMe
validInstantTimestamps.addAll(getRollbackedCommits(instant,
datasetTimeline));
});
- // add restore instants from MDT.
+ // add restore and rollback instants from MDT.
metadataMetaClient.getActiveTimeline().getRollbackAndRestoreTimeline().filterCompletedInstants()
- .filter(instant ->
instant.getAction().equals(HoodieTimeline.RESTORE_ACTION))
+ .filter(instant ->
instant.getAction().equals(HoodieTimeline.RESTORE_ACTION) ||
instant.getAction().equals(HoodieTimeline.ROLLBACK_ACTION))
.getInstants().forEach(instant ->
validInstantTimestamps.add(instant.getTimestamp()));
- // SOLO_COMMIT_TIMESTAMP is used during bootstrap so it is a valid
timestamp
- validInstantTimestamps.add(createIndexInitTimestamp(SOLO_COMMIT_TIMESTAMP,
PARTITION_INITIALIZATION_TIME_SUFFIX));
+
metadataMetaClient.getActiveTimeline().getDeltaCommitTimeline().filterCompletedInstants()
+ .filter(instant ->
instant.getTimestamp().startsWith(SOLO_COMMIT_TIMESTAMP))
+ .getInstants().forEach(instant ->
validInstantTimestamps.add(instant.getTimestamp()));
Review Comment:
yeah, I also bumped into the same. its already taken care here
https://github.com/apache/hudi/blob/2196694dbeac29fda86fa977fd90634474d4a50a/hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java#L1301
--
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]