Repository: mesos Updated Branches: refs/heads/master 882f65ad3 -> a152828e1
Sent `UpdateFrameworkMessage` even to disconnected frameworks. We used to only send `UpdateFrameworkMessage` to connected frameworks because it only included `PID`s. However, since now it also includes updates to the `FrameworkInfo`, we choose to lift this optimization and send it to all agents for (dis)connected frameworks. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/80a2e24b Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/80a2e24b Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/80a2e24b Branch: refs/heads/master Commit: 80a2e24b78f21c0c41a12787eced85fd42e4dce0 Parents: 882f65a Author: Michael Park <[email protected]> Authored: Fri Mar 3 03:49:28 2017 -0800 Committer: Michael Park <[email protected]> Committed: Sat Mar 4 10:55:17 2017 -0800 ---------------------------------------------------------------------- src/master/master.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/80a2e24b/src/master/master.cpp ---------------------------------------------------------------------- diff --git a/src/master/master.cpp b/src/master/master.cpp index 449e25a..c2cebd1 100644 --- a/src/master/master.cpp +++ b/src/master/master.cpp @@ -5958,18 +5958,15 @@ void Master::__reregisterSlave( foreach (const FrameworkID& frameworkId, ids) { Framework* framework = getFramework(frameworkId); - - // We don't need to send the PIDs of disconnected frameworks to - // re-registering slaves. - if (framework != nullptr && framework->connected()) { + if (framework != nullptr) { UpdateFrameworkMessage message; message.mutable_framework_id()->CopyFrom(framework->id()); + message.mutable_framework_info()->CopyFrom(framework->info); // TODO(anand): We set 'pid' to UPID() for http frameworks // as 'pid' was made optional in 0.24.0. In 0.25.0, we // no longer have to set pid here for http frameworks. message.set_pid(framework->pid.getOrElse(UPID())); - message.mutable_framework_info()->CopyFrom(framework->info); send(slave->pid, message); }
