Gary Yao created FLINK-14859:
--------------------------------
Summary: Avoid leaking unassigned Slot in DefaultScheduler when
Deployment is outdated
Key: FLINK-14859
URL: https://issues.apache.org/jira/browse/FLINK-14859
Project: Flink
Issue Type: Sub-task
Components: Runtime / Coordination
Affects Versions: 1.10.0
Reporter: Gary Yao
Assignee: Gary Yao
Fix For: 1.10.0
In {{DefaultScheduler#assignResourceOrHandleError()}}, if the deployment is
outdated, we should release the possibly acquired {{LogicalSlot}} so that we do
not leak resources.
Below is an example to illustrate how slot leak is currently possible:
# Vertices A1, A2, A3 are scheduled in a batch.
# A2 acquires a slot. A1, A3 do not.
# A1 fails due to slot allocation timeout and triggers failover
({{DefaultScheduler#cancelTasksAsync}})
# A2 is canceled first and its returned slot is assigned to A3, which triggers
{{DefaultScheduler#assignResourceOrHandleError}} of A3.
However, A3 is not canceled yet but it is outdated because
{{executionVertexVersioner#recordVertexModifications}} was already invoked
--
This message was sent by Atlassian Jira
(v8.3.4#803005)