Table rollback for inflight compactions MUST not delete instant files at any time to avoid race conditions
This commit is contained in:
committed by
vinoth chandar
parent
defcf6a0b9
commit
8adaca3454
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user