You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/10 23:35:02 UTC

[GitHub] [hudi] vinothchandar commented on a change in pull request #3428: [HUDI-2286] Handle the case of failed deltacommit on the metadata table.

vinothchandar commented on a change in pull request #3428:
URL: https://github.com/apache/hudi/pull/3428#discussion_r686389090



##########
File path: hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/functional/TestHoodieBackedMetadata.java
##########
@@ -857,6 +859,62 @@ public void testMetadataOutOfSync() throws Exception {
     validateMetadata(unsyncedClient);
   }
 
+  /**
+   * Test that failure to perform deltacommit on the metadata table does not lead to missed sync.
+   */
+  @Test
+  public void testMetdataTableCommitFailure() throws Exception {
+    init(HoodieTableType.COPY_ON_WRITE);
+    HoodieSparkEngineContext engineContext = new HoodieSparkEngineContext(jsc);
+
+    try (SparkRDDWriteClient client = new SparkRDDWriteClient(engineContext, getWriteConfig(true, true))) {
+      // Write 1
+      String newCommitTime = "001";
+      List<HoodieRecord> records = dataGen.generateInserts(newCommitTime, 20);

Review comment:
       wondering if we can use any existing test framework helpers to do these commits. Feel like this is repeated a lot in this file.




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org