zentol commented on a change in pull request #14921:
URL: https://github.com/apache/flink/pull/14921#discussion_r576776533
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SingleLogicalSlot.java
##########
@@ -197,20 +196,21 @@ private void signalPayloadRelease(Throwable cause) {
}
private void returnSlotToOwner(CompletableFuture<?> terminalStateFuture) {
- terminalStateFuture.whenComplete(
- (Object ignored, Throwable throwable) -> {
- if (state == State.RELEASING) {
- slotOwner.returnLogicalSlot(this);
- }
-
- markReleased();
-
- if (throwable != null) {
- releaseFuture.completeExceptionally(throwable);
- } else {
- releaseFuture.complete(null);
- }
- });
+ FutureUtils.assertNoException(
+ terminalStateFuture.whenComplete(
Review comment:
hmm...AFAIK this will never be completed exceptionally, but then we also
shouldn't handle Throwables like we do here (and instead fail with an
IllegalStateException I suppose).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]