You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "sivabalan narayanan (Jira)" <ji...@apache.org> on 2022/05/17 12:14:00 UTC
[jira] [Created] (HUDI-4112) Relax constraint in metadata table that rollback of a commit that got archived in MDT throws exception
sivabalan narayanan created HUDI-4112:
-----------------------------------------
Summary: 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
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.7#820007)