Invoke the shutdown executor callback for checkpointed frameworks. Previously, the executor library used to commit suicide after the recovery timeout without invoking the executor's shutdown callback. This behavior was not consistent with the executor driver.
Review: https://reviews.apache.org/r/52756/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8b4d83ae Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8b4d83ae Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8b4d83ae Branch: refs/heads/master Commit: 8b4d83aecc937996805e553c96f88486bd84ef35 Parents: a1dc1d3 Author: Anand Mazumdar <an...@apache.org> Authored: Wed Oct 12 17:34:40 2016 -0700 Committer: Vinod Kone <vinodk...@gmail.com> Committed: Wed Oct 12 17:37:02 2016 -0700 ---------------------------------------------------------------------- src/executor/executor.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/8b4d83ae/src/executor/executor.cpp ---------------------------------------------------------------------- diff --git a/src/executor/executor.cpp b/src/executor/executor.cpp index a0e5d83..1d47b52 100644 --- a/src/executor/executor.cpp +++ b/src/executor/executor.cpp @@ -478,10 +478,7 @@ protected: // Backoff and reconnect only if framework checkpointing is enabled. backoff(); } else { - Event event; - event.set_type(Event::SHUTDOWN); - - receive(event, true); + shutdown(); } } @@ -721,12 +718,20 @@ protected: } if (event.type() == Event::SHUTDOWN) { - shutdown(); + _shutdown(); } } void shutdown() { + Event event; + event.set_type(Event::SHUTDOWN); + + receive(event, true); + } + + void _shutdown() + { if (!local) { spawn(new ShutdownProcess(shutdownGracePeriod), true); } else {