[
https://issues.apache.org/jira/browse/HUDI-4112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18012396#comment-18012396
]
sivabalan narayanan commented on HUDI-4112:
-------------------------------------------
This is not valid anymore.
Only constrains we have wrt restore in mdt (when applying a restore from data
table is):
if the instant to be restored to is earliest than the earliest available base
file's instant time in MDT (files partition), we cannot afford to restore. And
request the user to disable metadata and proceed.
> 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
> Assignee: sivabalan narayanan
> Priority: Critical
> Fix For: 1.1.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)