the-other-tim-brown commented on code in PR #12562:
URL: https://github.com/apache/hudi/pull/12562#discussion_r1901226124
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -578,12 +568,28 @@ protected void postCommit(HoodieTable table,
HoodieCommitMetadata metadata, Stri
* @param table instance of {@link HoodieTable} of interest.
*/
protected void mayBeCleanAndArchive(HoodieTable table) {
- autoCleanOnCommit();
- autoArchiveOnCommit(table);
+ try {
+ autoCleanOnCommit();
+ autoArchiveOnCommit(table);
+ } catch (Throwable t) {
+ LOG.error(String.format("Inline cleaning or clustering failed for {}",
table.getConfig().getBasePath()), t);
+ throw t;
+ }
}
protected void runTableServicesInline(HoodieTable table,
HoodieCommitMetadata metadata, Option<Map<String, String>> extraMetadata) {
- tableServiceClient.runTableServicesInline(table, metadata, extraMetadata);
+ // We don't want to fail the commit if
hoodie.fail.writes.on.inline.table.service.exception is false. We catch warn if
false
+ try {
+ // do this outside of lock since compaction, clustering can be time
taking and we don't need a lock for the entire execution period
+ tableServiceClient.runTableServicesInline(table, metadata,
extraMetadata);
+ } catch (Throwable t) {
+ LOG.error(String.format("Inline compaction or clustering failed for
table {}.", table.getConfig().getBasePath()), t);
Review Comment:
You don't need to use `String.format`
Also this will log an error and potentially a warning, should we only log
once by moving this into the `if` block below
--
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]