Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/5954#discussion_r186376122
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPool.java
---
@@ -1070,13 +1071,22 @@ protected void
timeoutPendingSlotRequest(SlotRequestId slotRequestId) {
removePendingRequest(slotRequestId);
}
- private void releaseTaskManagerInternal(final ResourceID resourceId) {
- final FlinkException cause = new FlinkException("Releasing
TaskManager " + resourceId + '.');
+ private void releaseTaskManagerInternal(final ResourceID resourceId,
final Exception cause) {
--- End diff --
I think we can just use the `cause` exception and do not need to re-wrap it
into another exception.
If re-wrapping is needed for some reason, we need to add the original
exception as the cause.
---