1
0

Table rollback for inflight compactions MUST not delete instant files at any time to avoid race conditions

This commit is contained in:
Balaji Varadarajan
2019-02-05 16:54:31 -08:00
committed by vinoth chandar
parent defcf6a0b9
commit 8adaca3454
6 changed files with 97 additions and 18 deletions

View File

@@ -634,14 +634,14 @@ public class TestCleaner extends TestHoodieClientBase {
HoodieTable table = HoodieTable.getHoodieTable(
new HoodieTableMetaClient(jsc.hadoopConfiguration(), config.getBasePath(), true), config,
jsc);
table.rollback(jsc, Collections.emptyList());
table.rollback(jsc, Collections.emptyList(), true);
assertEquals("Some temp files are created.", tempFiles.size(), getTotalTempFiles());
config = HoodieWriteConfig.newBuilder().withPath(basePath).withUseTempFolderCopyOnWriteForCreate(true)
.withUseTempFolderCopyOnWriteForMerge(false).build();
table = HoodieTable.getHoodieTable(new HoodieTableMetaClient(jsc.hadoopConfiguration(), config.getBasePath(), true),
config, jsc);
table.rollback(jsc, Collections.emptyList());
table.rollback(jsc, Collections.emptyList(), true);
assertEquals("All temp files are deleted.", 0, getTotalTempFiles());
}