You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/12/02 21:29:12 UTC

[05/10] mesos git commit: Improved comments in the master.

Improved comments in the master.

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


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

Branch: refs/heads/master
Commit: 9ccfa5c1ecf6fc6374dba1709ac837874384cdc3
Parents: 4cc4fe4
Author: Neil Conway <ne...@gmail.com>
Authored: Fri Dec 2 13:28:15 2016 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Dec 2 13:28:15 2016 -0800

----------------------------------------------------------------------
 src/master/master.cpp | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9ccfa5c1/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index e03a2e8..b015b8d 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -1262,12 +1262,18 @@ void Master::exited(const UPID& pid)
 
       // The semantics when a registered slave gets disconnected are as
       // follows for each framework running on that slave:
-      // 1) If the framework is checkpointing: No immediate action is taken.
-      //    The slave is given a chance to reconnect until the slave
-      //    observer times out (75s) and removes the slave.
-      // 2) If the framework is not-checkpointing: The slave is not removed
-      //    but the framework is removed from the slave's structs,
-      //    its tasks transitioned to LOST and resources recovered.
+      //
+      // 1) If the framework is checkpointing: No immediate action is
+      //    taken. The slave is given a chance to reconnect until the
+      //    slave observer times out (75s) and removes the slave.
+      //
+      // 2) If the framework is not-checkpointing: The slave is not
+      //    removed but the framework is removed from the slave's
+      //    structs, its tasks transitioned to LOST and resources
+      //    recovered.
+      //
+      // NOTE: If the framework hasn't re-registered since the master
+      // failed over, we assume the framework is checkpointing.
       hashset<FrameworkID> frameworkIds =
         slave->tasks.keys() | slave->executors.keys();
 
@@ -7822,7 +7828,7 @@ void Master::removeTask(Task* task)
 
   // Remove from framework.
   Framework* framework = getFramework(task->framework_id());
-  if (framework != nullptr) { // A framework might not be re-connected yet.
+  if (framework != nullptr) { // A framework might not be re-registered yet.
     framework->removeTask(task);
   }