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 <[email protected]> Authored: Mon Jun 22 12:33:05 2015 -0700 Committer: Benjamin Mahler <[email protected]> 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
