This is an automated email from the ASF dual-hosted git repository. alexr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 8f400c3e5abe0fa1810a6efd56bc3fecabf1bbd3 Author: Alexander Rukletsov <[email protected]> AuthorDate: Thu Sep 27 15:20:01 2018 +0200 Put `TerminateEvent` at the end of the queue in the Mesos library. This is to ensure all pending dispatches are processed. However multistage events, e.g., `Call`, might still be dropped, because a continuation (stage) of such event can be dispatched after the termination event. Review: https://reviews.apache.org/r/68865 --- src/scheduler/scheduler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scheduler/scheduler.cpp b/src/scheduler/scheduler.cpp index 4711529..cb24ba9 100644 --- a/src/scheduler/scheduler.cpp +++ b/src/scheduler/scheduler.cpp @@ -1038,7 +1038,12 @@ void Mesos::reconnect() void Mesos::stop() { if (process != nullptr) { - terminate(process); + // We pass 'false' here to add the termination event at the end of the + // `MesosProcess` queue. This is to ensure all pending dispatches are + // processed. However multistage events, e.g., `Call`, might still be + // dropped, because a continuation (stage) of such event can be dispatched + // after the termination event, see MESOS-9274. + terminate(process, false); wait(process); delete process;
