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


##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/metadata/FlinkHoodieBackedTableMetadataWriter.java:
##########
@@ -149,9 +161,9 @@ protected void commit(String instantTime, 
Map<MetadataPartitionType, HoodieData<
         writeClient.getHeartbeatClient().start(instantTime);
       }
 
-      List<WriteStatus> statuses = preppedRecordList.size() > 0
-          ? writeClient.upsertPreppedRecords(preppedRecordList, instantTime)
-          : Collections.emptyList();
+      List<WriteStatus> statuses = isInitializing
+          ? writeClient.bulkInsertPreppedRecords(preppedRecordList, 
instantTime, Option.empty())

Review Comment:
   Flink does not support flexible partitioner like Spark do, but we can still 
get some benefits because writing Hfiles directly for initilization of MDT is 
more efficient. For example, when user enable the MDT for a existing table and 
there are plenty of metadata records to bootstrap with.



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