You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2014/12/11 23:55:42 UTC

[05/11] mesos git commit: Added a TODO in the master for an allocator bug.

Added a TODO in the master for an allocator bug.

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


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

Branch: refs/heads/master
Commit: c1421aacd2188f121ef4c34b684671f8a87a16f5
Parents: 3ea7e9a
Author: Benjamin Mahler <be...@gmail.com>
Authored: Thu Dec 4 14:27:22 2014 -0800
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Thu Dec 11 14:40:30 2014 -0800

----------------------------------------------------------------------
 src/master/master.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c1421aac/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 1cf2074..9936980 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -4531,8 +4531,14 @@ void Master::removeSlave(Slave* slave)
 
   LOG(INFO) << "Removing slave " << *slave;
 
-  // We do this first, to make sure any of the resources recovered
-  // below (e.g., removeTask()) are ignored by the allocator.
+  // We want to remove the slave first, to avoid the allocator
+  // re-allocating the recovered resources.
+  //
+  // NOTE: Removing the slave is not sufficient for recovering the
+  // resources in the allocator, because the "Sorters" are updated
+  // only within recoverResources() (see MESOS-621). The calls to
+  // recoverResources() below are therefore required, even though
+  // the slave is already removed.
   allocator->removeSlave(slave->id);
 
   // Transition the tasks to lost and remove them, BUT do not send