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 3947dcdee6153b24acc40316c57a7d8168c32c30
Author: Andrei Sekretenko <[email protected]>
AuthorDate: Tue Sep 3 10:27:59 2019 -0700

    Renamed totalAllocatedReservation -> totalOfferedOrAllocatedReservation.
    
    Review: https://reviews.apache.org/r/71401/
---
 src/master/allocator/mesos/hierarchical.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/master/allocator/mesos/hierarchical.cpp 
b/src/master/allocator/mesos/hierarchical.cpp
index 24342ff..e5063d0 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -1883,14 +1883,14 @@ void HierarchicalAllocatorProcess::__generateOffers()
 
   // TODO(mzhu): make allocation tracking hierarchical, so that we only
   // need to look at the top-level node.
-  ResourceQuantities totalAllocatedReservation;
+  ResourceQuantities totalOfferedOrAllocatedReservation;
   foreachkey (const string& role, roleTree.roles()) {
     if (!roleSorter->contains(role)) {
       continue; // This role has no allocation.
     }
 
     foreachvalue (const Resources& resources, roleSorter->allocation(role)) {
-      totalAllocatedReservation +=
+      totalOfferedOrAllocatedReservation +=
         
ResourceQuantities::fromScalarResources(resources.reserved().scalars());
     }
   }
@@ -1898,7 +1898,7 @@ void HierarchicalAllocatorProcess::__generateOffers()
   // Subtract total unallocated reservations.
   // unallocated reservations = total reservations - allocated reservations
   availableHeadroom -= roleTree.root()->reservationScalarQuantities() -
-                       totalAllocatedReservation;
+                       totalOfferedOrAllocatedReservation;
 
   // Subtract revocable resources.
   foreachvalue (const Slave& slave, slaves) {

Reply via email to