Currently there is an assumption that when a pending task is killed, the framework will still be stored in the agent. However, this assumption can be violated in two cases:
- Another pending task was killed and we removed the framework in 'Slave::run' thinking it was idle, because pending tasks were empty (we remove from pending tasks when processing the kill). (
MESOS-7783is an example instance of this).
- The last executor terminated without tasks to send terminal updates for, or the last terminated executor received its last acknowledgement. At this point, we remove the framework thinking there were no pending tasks if the task was killed (removed from pending).