mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@apache.org
Subject mesos git commit: Updated a comment for oversubscribed resources for clarity.
Date Thu, 22 Sep 2016 09:28:29 GMT
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 <rukletsov@gmail.com>
Authored: Wed Feb 3 15:50:32 2016 +0100
Committer: Alexander Rukletsov <alexr@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


Mime
View raw message