You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ab...@apache.org on 2019/08/26 12:46:13 UTC

[mesos] 01/03: Added missing `return` statement in `Slave::statusUpdate`.

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

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

commit cc79f22fb07cfad8f248150d5a3040f846998c3a
Author: Andrei Budnik <ab...@apache.org>
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 2a90e96..176d3fb 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -5388,6 +5388,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());