nsivabalan commented on code in PR #18197:
URL: https://github.com/apache/hudi/pull/18197#discussion_r2886055964


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -1682,4 +1684,25 @@ private InternalSchema 
getInternalSchema(TableSchemaResolver schemaUtil) {
       }
     });
   }
+
+  private void runPreWriteCleanerPolicy(HoodieTableMetaClient metaClient) {
+    if (!config.areTableServicesEnabled()) {
+      log.info("Skipping pre-write cleaner policy since table services are 
disabled");
+      return;
+    }
+    HoodiePreWriteCleanerPolicy policy = config.getPreWriteCleanerPolicy();
+    if (policy.isNone()) {
+      return;
+    }
+    switch (policy) {
+      case CLEAN:
+        tableServiceClient.clean(Option.empty(), true);

Review Comment:
   why do we need clean here? 
   if we have clean, it will automatically take care of rolling back failed 
writes as well right?
   So, I see the need only for either of the enum values.
   
   if you agree, we can just keep it a boolean config flag as well. 
   lmk wdyt



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