suryaprasanna commented on code in PR #17945:
URL: https://github.com/apache/hudi/pull/17945#discussion_r2738846500


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -580,8 +586,13 @@ public O postWrite(HoodieWriteMetadata<O> result, String 
instantTime, HoodieTabl
             result.getWriteStats().get().size());
       }
 
-      postCommit(hoodieTable, result.getCommitMetadata().get(), instantTime, 
Option.empty());
-      mayBeCleanAndArchive(hoodieTable);
+      HoodieTimer postWriteTimer = HoodieTimer.start();
+      try {
+        postCommit(hoodieTable, result.getCommitMetadata().get(), instantTime, 
Option.empty());

Review Comment:
   I restructured the PR, this comment is no longer relevant.



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -278,8 +279,13 @@ public boolean commitStats(String instantTime, 
TableWriteStats tableWriteStats,
 
     // trigger clean and archival.
     // Each internal call should ensure to lock if required.
-    mayBeCleanAndArchive(table);
-    runTableServicesInline(table, metadata, extraMetadata);
+    HoodieTimer postWriteTimer = HoodieTimer.start();
+    try {
+      mayBeCleanAndArchive(table);
+      runTableServicesInline(table, metadata, extraMetadata);
+    } finally {
+      
metrics.updatePostWriteOperationsDurationMetrics(postWriteTimer.endTimer());

Review Comment:
   I restructured the PR, this comment is no longer relevant.



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -278,8 +279,13 @@ public boolean commitStats(String instantTime, 
TableWriteStats tableWriteStats,
 
     // trigger clean and archival.
     // Each internal call should ensure to lock if required.
-    mayBeCleanAndArchive(table);
-    runTableServicesInline(table, metadata, extraMetadata);
+    HoodieTimer postWriteTimer = HoodieTimer.start();

Review Comment:
   I restructured the PR, this comment is no longer relevant.



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