This is an automated email from the ASF dual-hosted git repository.

abudnik pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 2d62e8ae0ef94f78c9b32be258a08d1e6e2382df
Author: Andrei Budnik <[email protected]>
AuthorDate: Fri Aug 23 14:36:18 2019 +0200

    Added missing `return` statement in `Slave::statusUpdate`.
    
    Previously, if `statusUpdate` was called for a pending task, it would
    forward the status update and then continue executing `statusUpdate`,
    which then checks if there is an executor that is aware of this task.
    Given that a pending task is not known to any executor, it would always
    handle it by forwarding status update one more time. This patch adds
    missing `return` statement, which fixes the issue.
    
    Review: https://reviews.apache.org/r/71361
---
 src/slave/slave.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 1c33579..edfe3d0 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -5418,6 +5418,8 @@ void Slave::statusUpdate(StatusUpdate update, const 
Option<UPID>& pid)
 
     taskStatusUpdateManager->update(update, info.id())
       .onAny(defer(self(), &Slave::___statusUpdate, lambda::_1, update, pid));
+
+    return;
   }
 
   Executor* executor = framework->getExecutor(status.task_id());

Reply via email to