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 74f40801e5bcfb435b1807e3582f12b2be1fe21e Author: Meng Zhu <[email protected]> AuthorDate: Thu May 23 16:29:37 2019 +0200 Added comment regarding tracking role consumed quota. Review: https://reviews.apache.org/r/70705 --- src/master/allocator/mesos/hierarchical.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/master/allocator/mesos/hierarchical.cpp b/src/master/allocator/mesos/hierarchical.cpp index ccca391..40c8363 100644 --- a/src/master/allocator/mesos/hierarchical.cpp +++ b/src/master/allocator/mesos/hierarchical.cpp @@ -1708,8 +1708,13 @@ void HierarchicalAllocatorProcess::__allocate() // Consumed Quota = reservations + unreserved allocation // First add reservations. + // + // Currently, only top level roles can have quota set and thus + // we only track consumed quota for top level roles. foreachkey (const string& role, quotaGuarantees) { if (roles.contains(role)) { + // Note, `reservationScalarQuantities` in `struct role` + // is hierarchical aware, thus it also includes subrole reservations. rolesConsumedQuota[role] += roles.at(role).reservationScalarQuantities; } }
