linliu-code commented on code in PR #12097:
URL: https://github.com/apache/hudi/pull/12097#discussion_r1801570037


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/BaseActionExecutor.java:
##########
@@ -61,10 +64,18 @@ public BaseActionExecutor(HoodieEngineContext context, 
HoodieWriteConfig config,
    *
    * @param metadata commit metadata of interest.
    */
-  protected final void writeTableMetadata(HoodieCommitMetadata metadata, 
HoodieData<WriteStatus> writeStatus, String actionType) {
+  protected final void writeTableMetadata(HoodieCommitMetadata metadata,
+                                          HoodieData<WriteStatus> writeStatus,
+                                          WriteOperationType operationType) {
     Option<HoodieTableMetadataWriter> metadataWriterOpt = 
table.getMetadataWriter(instantTime);
     if (metadataWriterOpt.isPresent()) {
       try (HoodieTableMetadataWriter metadataWriter = metadataWriterOpt.get()) 
{
+        // Recreate MDT for insert_overwrite_table operation.
+        if (WriteOperationType.INSERT_OVERWRITE_TABLE == operationType) {
+          HoodieTableMetadataUtil.deleteMetadataTable(table.getMetaClient(), 
table.getContext(), false);
+          new RunIndexActionExecutor<>(context, config, table, 
instantTime).execute();

Review Comment:
   I checked the logic, it sounds the metadatawriter initialization will try to 
recreate the table. I will remove this `RunIndexActionExecutor` usage here to 
see if it works.



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