StefanRRichter commented on a change in pull request #7568: [FLINK-11417] Make
access to ExecutionGraph single threaded from JobMaster main thread
URL: https://github.com/apache/flink/pull/7568#discussion_r250986365
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SingleLogicalSlot.java
##########
@@ -169,23 +168,19 @@ public void release(Throwable cause) {
releaseFuture.complete(null);
}
- private CompletableFuture<?> signalPayloadRelease(Throwable cause) {
+ private void signalPayloadRelease(Throwable cause) {
tryAssignPayload(TERMINATED_PAYLOAD);
- payload.fail(cause);
-
- return payload.getTerminalStateFuture();
+ payload.failAsync(cause); //TODO this goes from the pool
against the execution, has to by sync'ed back into the jm main thread
}
private void returnSlotToOwner(CompletableFuture<?>
terminalStateFuture) {
- final CompletableFuture<Boolean> slotReturnFuture =
terminalStateFuture.handle((Object ignored, Throwable throwable) -> {
+ terminalStateFuture.handle((Object ignored, Throwable
throwable) -> {
if (state == State.RELEASING) {
return slotOwner.returnAllocatedSlot(this);
} else {
return CompletableFuture.completedFuture(true);
}
- }).thenCompose(Function.identity());
-
- slotReturnFuture.whenComplete(
+ }).whenComplete( //TODO this could be inside the job master
main thread, should be inside slot pool main thread
Review comment:
Good catch, yes that was a clear mistake :-(
----------------------------------------------------------------
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