azagrebin commented on a change in pull request #6686: [FLINK-10329]
[FLINK-10328] Fail ZooKeeperSubmittedJobGraphStore#removeJobGraph if job cannot
be removed & Release all locks when stopping the ZooKeeperSubmittedJobGraphStore
URL: https://github.com/apache/flink/pull/6686#discussion_r217392484
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java
##########
@@ -768,27 +788,40 @@ private void jobMasterFailed(JobID jobId, Throwable
cause) {
*/
@Override
public void grantLeadership(final UUID newLeaderSessionID) {
- log.info("Dispatcher {} was granted leadership with fencing
token {}", getAddress(), newLeaderSessionID);
+ runAsyncWithoutFencing(
+ () -> {
+ log.info("Dispatcher {} was granted leadership
with fencing token {}", getAddress(), newLeaderSessionID);
- final CompletableFuture<Collection<JobGraph>>
recoveredJobsFuture = recoverJobs();
+ final CompletableFuture<Collection<JobGraph>>
recoveredJobsFuture = recoveryOperation.thenComposeAsync(
+ ignored -> recoverJobs(),
Review comment:
`recoverJobs` could be now blocking if we use
`recoveryOperation.thenApplyAsync`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services