Repository: mesos
Updated Branches:
  refs/heads/master e5094c43f -> a675604d7


Added a comment about master sending a checkpointed resources message.

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


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

Branch: refs/heads/master
Commit: a675604d7b1ff1dcdcbb06a539a226e872f6811c
Parents: e5094c4
Author: Jie Yu <yujie....@gmail.com>
Authored: Wed Sep 6 21:09:03 2017 -0700
Committer: Jie Yu <yujie....@gmail.com>
Committed: Fri Sep 8 09:32:09 2017 -0700

----------------------------------------------------------------------
 src/master/master.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a675604d/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 53ee87a..6d84a26 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -6608,6 +6608,15 @@ void Master::___reregisterSlave(
     }
   }
 
+  // Send checkpointed resources to the agent. This is important for
+  // the cases where the master didn't fail over. In that case, the
+  // master might have already applied an operation that the agent
+  // didn't see (e.g., due to a breaking connection). This message
+  // will sync the state between the master and the agent about
+  // checkpointed resources.
+  //
+  // TODO(jieyu): This message is not necessary for the case where the
+  // master fails over. Consider moving this to `reconcileKnownSlave`.
   CheckpointResourcesMessage message;
 
   message.mutable_resources()->CopyFrom(slave->checkpointedResources);

Reply via email to