This is an automated email from the ASF dual-hosted git repository. mzhu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 75f1fc753f567adad451648a2af54aaaf38ddd35 Author: Meng Zhu <[email protected]> AuthorDate: Tue May 28 16:22:25 2019 +0200 Renamed a variable in the allocator. Rename `newQuotaAllocation` to `newGuaranteeAllocation`. The new name clearly indicates that the allocation is made towards a role's quota guarantee. This clearly differentiates from quota limits. Review: https://reviews.apache.org/r/70734 --- src/master/allocator/mesos/hierarchical.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/master/allocator/mesos/hierarchical.cpp b/src/master/allocator/mesos/hierarchical.cpp index 930eb8e..3391d7e 100644 --- a/src/master/allocator/mesos/hierarchical.cpp +++ b/src/master/allocator/mesos/hierarchical.cpp @@ -1881,10 +1881,10 @@ void HierarchicalAllocatorProcess::__allocate() Resources unreserved = available.nonRevocable().unreserved(); // First, allocate resources up to a role's quota guarantee. - Resources newQuotaAllocation = + Resources newGuaranteeAllocation = shrinkResources(unreserved, unsatisfiedQuotaGuarantees); - toAllocate += newQuotaAllocation; + toAllocate += newGuaranteeAllocation; // We only include the non-quota guarantee resources (with headroom // taken into account) if this role is getting any other resources @@ -1948,8 +1948,8 @@ void HierarchicalAllocatorProcess::__allocate() // role's guarantee should be subtracted. Allocation of reserved // resources or resources that this role has unset guarantee do not // affect `requiredHeadroom`. - requiredHeadroom -= - ResourceQuantities::fromScalarResources(newQuotaAllocation.scalars()); + requiredHeadroom -= ResourceQuantities::fromScalarResources( + newGuaranteeAllocation.scalars()); // `availableHeadroom` counts total unreserved non-revocable resources // in the cluster.
