Repository: mesos
Updated Branches:
  refs/heads/master bf4bc6380 -> c76ddee30


Removed some dead code in the master.

Master generated status update will go through the `forward` interface
now. This code path is no longer used.

Review: https://reviews.apache.org/r/64233


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c76ddee3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c76ddee3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c76ddee3

Branch: refs/heads/master
Commit: c76ddee30ba90a4af4dd31c4dbdd40754fecea6a
Parents: bf4bc63
Author: Jie Yu <[email protected]>
Authored: Thu Nov 30 15:01:41 2017 -0800
Committer: Jie Yu <[email protected]>
Committed: Thu Nov 30 15:39:30 2017 -0800

----------------------------------------------------------------------
 src/master/master.cpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c76ddee3/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index eadc008..b435fbc 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -7519,6 +7519,8 @@ void Master::updateUnavailability(
 // TODO(vinod): Add a benchmark test for status update handling.
 void Master::statusUpdate(StatusUpdate update, const UPID& pid)
 {
+  CHECK_NE(pid, UPID());
+
   ++metrics->messages_status_update;
 
   if (slaves.removed.get(update.slave_id()).isSome()) {
@@ -7590,12 +7592,6 @@ void Master::statusUpdate(StatusUpdate update, const 
UPID& pid)
 
   updateTask(task, update);
 
-  // If the task is terminal and no acknowledgement is needed,
-  // then remove the task now.
-  if (protobuf::isTerminalState(task->state()) && pid == UPID()) {
-    removeTask(task);
-  }
-
   validStatusUpdate
     ? metrics->valid_status_updates++ : metrics->invalid_status_updates++;
 }

Reply via email to