Repository: mesos
Updated Branches:
  refs/heads/master 2fc1f5b10 -> 47cdd5a7b


Removed redundant 'toUnreserved()' call in the allocator.

This call is no longer necessary as the reservation metadata is now
stripped by `createStrippedScalarQuantity`.

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


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

Branch: refs/heads/master
Commit: 47cdd5a7b6be977638071ec9fc3bc86264a29d1f
Parents: 2fc1f5b
Author: Meng Zhu <[email protected]>
Authored: Mon Jul 2 15:42:33 2018 -0700
Committer: Benjamin Mahler <[email protected]>
Committed: Mon Jul 2 15:42:33 2018 -0700

----------------------------------------------------------------------
 src/master/allocator/mesos/hierarchical.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/47cdd5a7/src/master/allocator/mesos/hierarchical.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.cpp 
b/src/master/allocator/mesos/hierarchical.cpp
index cbdfb2b..5a6cd3d 100644
--- a/src/master/allocator/mesos/hierarchical.cpp
+++ b/src/master/allocator/mesos/hierarchical.cpp
@@ -2459,8 +2459,7 @@ bool HierarchicalAllocatorProcess::allocatable(const 
Resources& resources)
     return true;
   }
 
-  // We remove the static reservation metadata here via `toUnreserved()`.
-  Resources quantity = resources.createStrippedScalarQuantity().toUnreserved();
+  Resources quantity = resources.createStrippedScalarQuantity();
   foreach (
       const Resources& minResources, CHECK_NOTNONE(minAllocatableResources)) {
     if (quantity.contains(minResources)) {

Reply via email to