danny0405 commented on code in PR #11137:
URL: https://github.com/apache/hudi/pull/11137#discussion_r1590551059


##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/functional/TestHoodieMetadataBootstrap.java:
##########
@@ -167,20 +167,19 @@ public void testMetadataBootstrapInflightCommit() throws 
Exception {
     HoodieTableType tableType = COPY_ON_WRITE;
     init(tableType, false);
 
+    // In real production env, bootstrap action can only happen on empty table,
+    // otherwise we need to roll back the previous bootstrap first,
+    // see 'SparkBootstrapCommitActionExecutor.execute' for more details.
     doPreBootstrapWriteOperation(testTable, INSERT, "0000001");
     doPreBootstrapWriteOperation(testTable, "0000002");
     // add an inflight commit
     HoodieCommitMetadata inflightCommitMeta = 
testTable.doWriteOperation("00000007", UPSERT, emptyList(),
-        asList("p1", "p2"), 2, true, true);
+        asList("p1", "p2"), 2, false, true);

Review Comment:
   I added the comment, the bootstrap action only happens once, that is the 
limination of itself, the tricky part is that the commit metadata for bootstrap 
file metadata only contains the file group id instead of specfic file names.



-- 
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]

Reply via email to