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 2015/06/22 21:33:48 UTC

mesos git commit: Added an invariant CHECK for available resources in the allocator.

Repository: mesos
Updated Branches:
  refs/heads/master b44d61d0d -> 2ef849a7c


Added an invariant CHECK for available resources in the allocator.

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


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

Branch: refs/heads/master
Commit: 2ef849a7ca91a2785d950141a6bc1819d40a75d3
Parents: b44d61d
Author: Michael Park <mc...@gmail.com>
Authored: Mon Jun 22 12:33:05 2015 -0700
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Mon Jun 22 12:33:05 2015 -0700

----------------------------------------------------------------------
 src/master/allocator/mesos/hierarchical.hpp | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2ef849a7/src/master/allocator/mesos/hierarchical.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index 7097482..ef18ff8 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -699,12 +699,8 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::updateAllocation(
 
   slaves[slaveId].total = updatedTotal.get();
 
-  // TODO(bmahler): Validate that the available resources are
-  // unaffected. This requires augmenting the sorters with
-  // SlaveIDs for allocations, so that we can do:
-  //
-  //   CHECK_EQ(slaves[slaveId].total - updatedAllocation,
-  //            slaves[slaveId].available);
+  CHECK_EQ(slaves[slaveId].total - updatedAllocation.get(),
+           slaves[slaveId].available);
 
   // TODO(jieyu): Do not log if there is no update.
   LOG(INFO) << "Updated allocation of framework " << frameworkId