You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2011/06/05 10:45:51 UTC

svn commit: r1132111 - /incubator/mesos/trunk/src/master/master.cpp

Author: benh
Date: Sun Jun  5 08:45:51 2011
New Revision: 1132111

URL: http://svn.apache.org/viewvc?rev=1132111&view=rev
Log:
Bug fix with framework messages.

Modified:
    incubator/mesos/trunk/src/master/master.cpp

Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1132111&r1=1132110&r2=1132111&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Sun Jun  5 08:45:51 2011
@@ -369,11 +369,17 @@ void Master::operator () ()
         foreachpair (_, Task *task, slave->tasks) {
           if (framework->id == task->frameworkId) {
             framework->addTask(task);
-            send(slave->pid, pack<M2S_UPDATE_FRAMEWORK_PID>(framework->id,
-                                                            framework->pid));
           }
         }
       }
+
+      // Broadcast the new framework pid to all the slaves. We have to
+      // broadcast because an executor might be running on a slave but
+      // it currently isn't running any tasks. This could be a
+      // potential scalability issue ...
+      foreachpair (_, Slave *slave, slaves)
+	send(slave->pid, pack<M2S_UPDATE_FRAMEWORK_PID>(framework->id,
+							framework->pid));
       break;
     }
 
@@ -709,9 +715,9 @@ void Master::operator () ()
         FrameworkID fid = pidToFid[from()];
         if (Framework *framework = lookupFramework(fid)) {
           LOG(INFO) << framework << " disconnected";
-//  	  framework->failoverTimer = new FrameworkFailoverTimer(self(), fid);
-//  	  link(spawn(framework->failoverTimer));
-          removeFramework(framework);
+//   	  framework->failoverTimer = new FrameworkFailoverTimer(self(), fid);
+//   	  link(spawn(framework->failoverTimer));
+	  removeFramework(framework);
         }
       } else if (pidToSid.find(from()) != pidToSid.end()) {
         SlaveID sid = pidToSid[from()];