kbuci commented on code in PR #18197:
URL: https://github.com/apache/hudi/pull/18197#discussion_r2892867494
##########
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:
Since clean implicitly does rollback of failed writes, I think it makes
sense to keep the option of `clean` vs `rollback_failed_writes` vs `do nothing`
mutually exclusive.
--
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]