Skip to content

Commit

Permalink
[hotfix][coordination] Provide richer exception message for suppresse…
Browse files Browse the repository at this point in the history
…d exceptions durnig coordinator failover
  • Loading branch information
StephanEwen committed Jul 21, 2021
1 parent 798003c commit be82c54
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,6 @@ public OperatorID getOperatorId() {
@Override
public void failJob(final Throwable cause) {
checkInitialized();
if (failed) {
LOG.debug(
"Ignoring the request to fail job because the job is already failing. "
+ "The ignored failure cause is",
cause);
return;
}
failed = true;

final FlinkException e =
new FlinkException(
Expand All @@ -559,6 +551,15 @@ public void failJob(final Throwable cause) {
+ ").",
cause);

if (failed) {
LOG.debug(
"Ignoring the request to fail job because the job is already failing. "
+ "The ignored failure cause is",
e);
return;
}
failed = true;

schedulerExecutor.execute(() -> globalFailureHandler.accept(e));
}

Expand Down

0 comments on commit be82c54

Please sign in to comment.