Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MINOR] Fix bad log info in table services #12570

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ protected void mayBeCleanAndArchive(HoodieTable table) {
autoCleanOnCommit();
autoArchiveOnCommit(table);
} catch (Throwable t) {
LOG.error(String.format("Inline cleaning or clustering failed for {}", table.getConfig().getBasePath()), t);
LOG.error("Inline cleaning or clustering failed for {}", table.getConfig().getBasePath(), t);
throw t;
}
}
Expand All @@ -584,12 +584,13 @@ protected void runTableServicesInline(HoodieTable table, HoodieCommitMetadata me
// do this outside of lock since compaction, clustering can be time taking and we don't need a lock for the entire execution period
runTableServicesInlineInternal(table, metadata, extraMetadata);
} catch (Throwable t) {
LOG.error(String.format("Inline compaction or clustering failed for table {}.", table.getConfig().getBasePath()), t);
// Throw if this is exception and the exception is configured to throw or if it is something else like Error.
if (config.isFailOnInlineTableServiceExceptionEnabled() || !(t instanceof Exception)) {
LOG.error("Inline compaction or clustering failed for table {}.", table.getConfig().getBasePath(), t);
throw t;
}
LOG.warn("Inline compaction or clustering failed. Moving further since \"hoodie.fail.writes.on.inline.table.service.exception\" is set to false.", t);
LOG.warn("Inline compaction or clustering failed for table {}. Moving further since "
+ "\"hoodie.fail.writes.on.inline.table.service.exception\" is set to false.", table.getConfig().getBasePath(), t);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public int archiveIfRequired(HoodieEngineContext context, boolean acquireLock) t
List<HoodieInstant> instantsToArchive = getInstantsToArchive();
if (!instantsToArchive.isEmpty()) {
this.writer = openWriter(archiveFilePath.getParent());
LOG.info(String.format("Archiving instants {} for table {}", instantsToArchive, config.getBasePath()));
LOG.info("Archiving instants {} for table {}", instantsToArchive, config.getBasePath());
archive(context, instantsToArchive);
LOG.info("Deleting archived instants {} for table {}", instantsToArchive, config.getBasePath());
deleteArchivedInstants(instantsToArchive, context);
Expand Down
Loading