Repository: mesos
Updated Branches:
  refs/heads/master 93bb63277 -> 73c02a9b9


Changed the if statement to a CHECK at the end of  _runTask.

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


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

Branch: refs/heads/master
Commit: 73c02a9b9b66e9cc4354b54fffd28f8add1a1cd4
Parents: 93bb632
Author: Michael Park <[email protected]>
Authored: Mon Jun 22 10:27:26 2015 -0700
Committer: Jie Yu <[email protected]>
Committed: Mon Jun 22 10:27:27 2015 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/73c02a9b/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 40c0c33..946e372 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -1578,11 +1578,10 @@ void Slave::_runTask(
       break;
   }
 
-  // Refer to the comment after 'framework->pending.erase' above
-  // for why we need this.
-  if (framework->executors.empty() && framework->pending.empty()) {
-    removeFramework(framework);
-  }
+  // We don't perform the checks for 'removeFramework' here since
+  // we're guaranteed by 'launchExecutor' that 'framework->executors'
+  // will be non-empty.
+  CHECK(!framework->executors.empty());
 }
 
 

Reply via email to