[ 
https://issues.apache.org/jira/browse/FLINK-10329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613534#comment-16613534
 ] 

ASF GitHub Bot commented on FLINK-10329:
----------------------------------------

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:
us...@infra.apache.org


> Fail with exception if job cannot be removed by 
> ZooKeeperSubmittedJobGraphStore#removeJobGraph
> ----------------------------------------------------------------------------------------------
>
>                 Key: FLINK-10329
>                 URL: https://issues.apache.org/jira/browse/FLINK-10329
>             Project: Flink
>          Issue Type: Bug
>          Components: Distributed Coordination
>    Affects Versions: 1.5.3, 1.6.0, 1.7.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.6.1, 1.7.0, 1.5.4
>
>
> Callers of {{ZooKeeperSubmittedJobGraph#removeJobGraph}} expect that we fail 
> with an exception if the {{JobGraph}} cannot be removed. This is not the case 
> since we call internally {{ZooKeeperStateHandleStore#releaseAndTryRemove}}. 
> If this method returns {{false}}, then we need to fail with an exception.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to