You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/01/26 22:55:20 UTC

mesos git commit: Added a comment in the `allocate` function.

Repository: mesos
Updated Branches:
  refs/heads/master 7ba659cdc -> ffcef51f0


Added a comment in the `allocate` function.


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

Branch: refs/heads/master
Commit: ffcef51f06f41f707e7026070f2335b956ed9d2c
Parents: 7ba659c
Author: Michael Park <mp...@apache.org>
Authored: Mon Jan 25 17:21:31 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Tue Jan 26 13:54:58 2016 -0800

----------------------------------------------------------------------
 src/master/allocator/mesos/hierarchical.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ffcef51f/src/master/allocator/mesos/hierarchical.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.cpp b/src/master/allocator/mesos/hierarchical.cpp
index 65c7e6b..fa99397 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -1296,6 +1296,11 @@ void HierarchicalAllocatorProcess::allocate(
         // Calculate the currently available resources on the slave.
         Resources available = slaves[slaveId].total - slaves[slaveId].allocated;
 
+        // The resources we offer are the unreserved resources as well as the
+        // reserved resources for this particular role. This is necessary to
+        // ensure that we don't offer resources that are reserved for another
+        // role.
+        //
         // NOTE: Currently, frameworks are allowed to have '*' role.
         // Calling reserved('*') returns an empty Resources object.
         Resources resources = available.unreserved() + available.reserved(role);