Skip to content

Commit

Permalink
[HUDI-2796] Metadata table support for Restore action to first commit
Browse files Browse the repository at this point in the history
 - Test fixes and other minor review comments
  • Loading branch information
manojpec committed Nov 19, 2021
1 parent 1895076 commit 0bc22b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -362,7 +362,6 @@ private <T extends SpecificRecordBase> boolean isBootstrapNeeded(Option<HoodieIn
*/
private <T extends SpecificRecordBase> boolean isCommitRevertedByInFlightAction(Option<T> actionMetadata,
final String latestMetadataInstantTimestamp) {

if (!actionMetadata.isPresent()) {
return false;
}
Expand All @@ -384,7 +383,6 @@ private <T extends SpecificRecordBase> boolean isCommitRevertedByInFlightAction(
return true;
}
break;

case HoodieTimeline.RESTORE_ACTION:
List<HoodieInstantInfo> restoredInstants =
((HoodieRestoreMetadata) actionMetadata.get()).getRestoreInstantInfo();
Expand All @@ -396,7 +394,6 @@ private <T extends SpecificRecordBase> boolean isCommitRevertedByInFlightAction(
return true;
}
break;

default:
return false;
}
Expand Down
Expand Up @@ -361,7 +361,7 @@ public void testRollbackOperations(HoodieTableType tableType) throws Exception {
@Test
public void testManualRollbacks() throws Exception {
HoodieTableType tableType = COPY_ON_WRITE;
init(tableType, true);
init(tableType, false);
// Setting to archive more aggressively on the Metadata Table than the Dataset
final int maxDeltaCommitsBeforeCompaction = 4;
final int minArchiveCommitsMetadata = 2;
Expand Down Expand Up @@ -871,7 +871,7 @@ public void testReader() throws Exception {
*/
@Test
public void testCleaningArchivingAndCompaction() throws Exception {
init(HoodieTableType.COPY_ON_WRITE, true);
init(HoodieTableType.COPY_ON_WRITE, false);
HoodieSparkEngineContext engineContext = new HoodieSparkEngineContext(jsc);

final int maxDeltaCommitsBeforeCompaction = 3;
Expand Down

0 comments on commit 0bc22b6

Please sign in to comment.