danny0405 commented on code in PR #10945:
URL: https://github.com/apache/hudi/pull/10945#discussion_r1549328342


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1375,33 +1375,15 @@ public static Set<String> 
getValidInstantTimestamps(HoodieTableMetaClient dataMe
   /**
    * Checks if the Instant is a delta commit and has a valid suffix for 
operations on MDT.
    *
+   * @param datasetPendingInstants The dataset pending instants
    * @param instant {@code HoodieInstant} to check.
    * @return {@code true} if the instant is valid.
    */
-  public static boolean isValidInstant(HoodieInstant instant) {
-    // Should be a deltacommit
-    if (!instant.getAction().equals(HoodieTimeline.DELTA_COMMIT_ACTION)) {
-      return false;
-    }
-
-    // Check correct length. The timestamp should have a suffix over the 
timeline's timestamp format.
-    final String instantTime = instant.getTimestamp();
-    if (!(instantTime.length() == MILLIS_INSTANT_ID_LENGTH + 
OperationSuffix.METADATA_INDEXER.getSuffix().length())) {
-      return false;

Review Comment:
   Removed because the check `datasetPendingInstants.contains` covers this 
scenario, currently only the index init instant has a suffix which might be 
comprised by `last data set completed instant` + `%3d` or 
`SOLO_COMMIT_TIMESTAMP` + `%3d`.
   
   For all the other cases, we do not introduce any suffix at all.



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