prashantwason commented on code in PR #8758:
URL: https://github.com/apache/hudi/pull/8758#discussion_r1231386685


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -344,17 +346,18 @@ protected void preCommit(HoodieInstant inflightInstant, 
HoodieCommitMetadata met
 
   /**
    * Write the HoodieCommitMetadata to metadata table if available.
-   * @param table {@link HoodieTable} of interest.
+   *
+   * @param table       {@link HoodieTable} of interest.
    * @param instantTime instant time of the commit.
-   * @param actionType action type of the commit.
-   * @param metadata instance of {@link HoodieCommitMetadata}.
+   * @param actionType  action type of the commit.
+   * @param metadata    instance of {@link HoodieCommitMetadata}.
    */
-  protected void writeTableMetadata(HoodieTable table, String instantTime, 
String actionType, HoodieCommitMetadata metadata) {
+  protected void writeTableMetadata(HoodieTable table, String instantTime, 
String actionType, HoodieCommitMetadata metadata, HoodieData<WriteStatus> 
writeStatuses) {
     if (table.isTableServiceAction(actionType, instantTime)) {
-      tableServiceClient.writeTableMetadata(table, instantTime, actionType, 
metadata);
+      tableServiceClient.writeTableMetadata(table, instantTime, actionType, 
metadata, writeStatuses);
     } else {
       context.setJobStatus(this.getClass().getSimpleName(), "Committing to 
metadata table: " + config.getTableName());
-      table.getMetadataWriter(instantTime).ifPresent(w -> 
((HoodieTableMetadataWriter) w).update(metadata, instantTime));
+      table.getMetadataWriter(instantTime).ifPresent(w -> 
((HoodieTableMetadataWriter) w).update(metadata, writeStatuses, instantTime));

Review Comment:
   We need both new keys and old ones as there may be updates (e.g records 
moving across partition paths etc)



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