XComp commented on code in PR #22341:
URL: https://github.com/apache/flink/pull/22341#discussion_r1269643021
##########
flink-runtime/src/main/java/org/apache/flink/runtime/dispatcher/Dispatcher.java:
##########
@@ -575,12 +576,13 @@ private boolean isDuplicateJob(JobID jobId) throws
FlinkException {
*/
private boolean isInGloballyTerminalState(JobID jobId) throws
FlinkException {
try {
- return jobResultStore.hasJobResultEntry(jobId);
- } catch (IOException e) {
- throw new FlinkException(
- String.format("Failed to retrieve job scheduling status
for job %s.", jobId),
- e);
+ return jobResultStore.hasJobResultEntryAsync(jobId).get();
Review Comment:
again, calling `.get()` on a `CompletableFuture` just to create another
`CompletableFuture` isn't how you would try to solve asynchronous calls. You
should utilize the `CompletableFuture` methods to chain callbacks
asynchronously.
--
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]