zentol commented on a change in pull request #19047:
URL: https://github.com/apache/flink/pull/19047#discussion_r824622823
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/runner/JobDispatcherLeaderProcessFactoryFactory.java
##########
@@ -77,7 +79,15 @@ public JobDispatcherLeaderProcessFactory createFactory(
}
final JobResultStore jobResultStore =
jobPersistenceComponentFactory.createJobResultStore();
- final Collection<JobResult> recoveredDirtyJobResults =
getDirtyJobResults(jobResultStore);
+
+ if (accessJobResultStore(
+ () ->
jobResultStore.hasCleanJobResultEntry(jobGraph.getJobID()))) {
+ throw new FlinkRuntimeException(
+
DuplicateJobSubmissionException.ofGloballyTerminatedAndCleaned(
Review comment:
Why do we check this in 2 places (here and the
ApplicationDispatcherBootstrap)?
It seems like we keep spreading these checks around; Dispatcher#submitJob is
alkso checking for duplicate jobs...
Not sure whether this is maintainable.
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/runner/JobDispatcherLeaderProcessFactoryFactory.java
##########
@@ -77,7 +79,15 @@ public JobDispatcherLeaderProcessFactory createFactory(
}
final JobResultStore jobResultStore =
jobPersistenceComponentFactory.createJobResultStore();
- final Collection<JobResult> recoveredDirtyJobResults =
getDirtyJobResults(jobResultStore);
+
+ if (accessJobResultStore(
+ () ->
jobResultStore.hasCleanJobResultEntry(jobGraph.getJobID()))) {
+ throw new FlinkRuntimeException(
Review comment:
Seems questionable to throw a RuntimeException here.
--
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]