nada-attia commented on code in PR #18133:
URL: https://github.com/apache/hudi/pull/18133#discussion_r2805184168
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/io/TestHoodieTimelineArchiver.java:
##########
@@ -2048,4 +2053,51 @@ private void assertInstantListEquals(List<HoodieInstant>
expected, List<HoodieIn
assertEquals(expectedInstant.getState(), actualInstant.getState());
}
}
+
+ @Test
+ public void testArchiveWithOOMOnLargeCommitFile() throws Exception {
+ // Initialize table with archival config
+ HoodieWriteConfig writeConfig = initTestTableAndGetWriteConfig(false, 2,
3, 2);
+ writeConfig.setValue(HoodieArchivalConfig.COMMITS_ARCHIVAL_BATCH_SIZE,
"20");
+
+ // Create multiple large commit file by adding many write stats
+ for (int i = 1; i < 20; i++) {
+ String largeCommitTime = String.format("0000000%d", i);
+ testTable.addInflightCommit(largeCommitTime);
+ HoodieCommitMetadata largeCommitMetadata = new HoodieCommitMetadata();
+ largeCommitMetadata.addMetadata(HoodieCommitMetadata.SCHEMA_KEY,
HoodieTestTable.PHONY_TABLE_SCHEMA);
+
+ // Add 500k write stats to simulate a large commit file
+ for (int j = 0; j < 500000; j++) {
Review Comment:
updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]