Repository: mesos
Updated Branches:
  refs/heads/master 7a4a7a53b -> cd3f27e1e


Updated a comment for oversubscribed resources for clarity.

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


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

Branch: refs/heads/master
Commit: cd3f27e1e4ea5ef0b1c16f3abee745ceee3c8064
Parents: 7a4a7a5
Author: Alexander Rukletsov <ruklet...@gmail.com>
Authored: Wed Feb 3 15:50:32 2016 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Thu Sep 22 11:27:41 2016 +0200

----------------------------------------------------------------------
 src/master/allocator/mesos/hierarchical.cpp | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/cd3f27e1/src/master/allocator/mesos/hierarchical.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.cpp 
b/src/master/allocator/mesos/hierarchical.cpp
index 2d56bd0..3f51f41 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -528,9 +528,15 @@ void HierarchicalAllocatorProcess::updateSlave(
   const Resources oldRevocable = slaves[slaveId].total.revocable();
 
   // Update the total resources.
-
-  // Remove the old oversubscribed resources from the total and then
-  // add the new estimate of oversubscribed resources.
+  //
+  // Reset the total resources to include the non-revocable resources,
+  // plus the new estimate of oversubscribed resources.
+  //
+  // NOTE: All modifications to revocable resources in the allocator for
+  // `slaveId` are lost.
+  //
+  // TODO(alexr): Update this math once the source of revocable resources
+  // is extended beyond oversubscription.
   slaves[slaveId].total = slaves[slaveId].total.nonRevocable() + 
oversubscribed;
 
   // Update the total resources in the `roleSorter` by removing the

Reply via email to