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

make the timeout publishing as a failure #4175

Closed
Closed
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 @@ -279,6 +279,7 @@ public TaskStatus run(final TaskToolbox toolbox) throws Exception
)
);

boolean publishedSuccessfully = false;
try (
final Appenderator appenderator0 = newAppenderator(fireDepartmentMetrics, toolbox);
final FiniteAppenderatorDriver driver = newDriver(appenderator0, toolbox, fireDepartmentMetrics);
Expand Down Expand Up @@ -516,6 +517,7 @@ public boolean publishSegments(Set<DataSegment> segments, Object commitMetadata)
if (published == null) {
throw new ISE("Transaction failure publishing segments, aborting");
} else {
publishedSuccessfully = true;
log.info(
"Published segments[%s] with metadata[%s].",
Joiner.on(", ").join(
Expand Down Expand Up @@ -548,6 +550,11 @@ public String apply(DataSegment input)
throw e;
}

if (!publishedSuccessfully){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will lead to improper behavior when a task is asked to stop for "normal" reasons (such as schema change). Maybe this is better dealt with at the supervisor level.

log.error("The task did NOT publish the segments successfully, check the value of [completionTimeout]");
throw e;
}

log.info("The task was asked to stop before completing");
}
finally {
Expand Down