You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Raymond Xu (Jira)" <ji...@apache.org> on 2022/09/19 10:52:00 UTC

[jira] [Updated] (HUDI-4112) Relax constraint in metadata table that rollback of a commit that got archived in MDT throws exception

     [ https://issues.apache.org/jira/browse/HUDI-4112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Xu updated HUDI-4112:
-----------------------------
    Sprint:   (was: 2022/09/19)

> Relax constraint in metadata table that rollback of a commit that got archived in MDT throws exception
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HUDI-4112
>                 URL: https://issues.apache.org/jira/browse/HUDI-4112
>             Project: Apache Hudi
>          Issue Type: Bug
>          Components: metadata
>            Reporter: sivabalan narayanan
>            Priority: Blocker
>             Fix For: 0.13.0
>
>
> when we are trying to rollback a commit, and if the commit it archived in MDT, when this rollback is getting applied to MDT, we throw exception. 
>  
> excerpt from HoodieTableMetadataUtil.java
>  
> {code:java}
> HoodieInstant syncedInstant = new HoodieInstant(false, HoodieTimeline.DELTA_COMMIT_ACTION, instantToRollback);
> if (metadataTableTimeline.getCommitsTimeline().isBeforeTimelineStarts(syncedInstant.getTimestamp())) {
>   throw new HoodieMetadataException(String.format("The instant %s required to sync rollback of %s has been archived",
>       syncedInstant, instantToRollback));
> }
> shouldSkip = !metadataTableTimeline.containsInstant(syncedInstant);
> if (!hasNonZeroRollbackLogFiles && shouldSkip) {
>   LOG.info(String.format("Skipping syncing of rollbackMetadata at %s, since this instant was never committed to Metadata Table",
>       instantToRollback));
>   return;
> } {code}
>  
> This is very much valid in case of restore operation. 
> C1, C2, C3, C4, C5, C6. 
> C2 savepointed. 
> but MDT could have archived C2(aggressive archival commits) since all C1 to C6 are committed. So, when we trigger restore to C1, it will invoke rollback of C6, C5... C2. 
> So, with savepoint and restore flow, this is a valid scenario and we need to relax the constraint. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)