mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Meng Zhu <m...@mesosphere.io>
Subject Re: Review Request 70393: Fixed incorrect quota headroom and consumption calculations.
Date Fri, 05 Apr 2019 00:59:23 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/70393/#review214393
-----------------------------------------------------------


Fix it, then Ship it!





src/master/allocator/mesos/hierarchical.cpp
Lines 1714-1715 (patched)
<https://reviews.apache.org/r/70393/#comment300603>

    I think this could just be:
    
    ```
    const string& topLevelRole = role.substr(0, role.find('/'));
    ```
    
    I do not have strong opinion on this, I will leave this up to you.



src/master/allocator/mesos/hierarchical.cpp
Lines 1711-1725 (original), 1722-1736 (patched)
<https://reviews.apache.org/r/70393/#comment300604>

    We should be able to combine these two?
    
    ```
    // Then add allocated unreserved resource quantities.
    if (roleSorter->contains(role)) {
      foreachvalue (const Resources& resources, roleSorter->allocation(role)) {
        rolesConsumedQuota[topLevelRole] += ResourceQuantities::fromScalarResources(resources.unreserved().nonRevocable().scalars());
      }
    }
    
    ```


- Meng Zhu


On April 4, 2019, 4 p.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70393/
> -----------------------------------------------------------
> 
> (Updated April 4, 2019, 4 p.m.)
> 
> 
> Review request for mesos and Meng Zhu.
> 
> 
> Bugs: MESOS-9688 and MESOS-9691
>     https://issues.apache.org/jira/browse/MESOS-9688
>     https://issues.apache.org/jira/browse/MESOS-9691
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> There was an invalid assumption that the sorter returns
> hierarchically aggregated allocation information, whereas
> it actually returns the "." internal node information. This
> patch adjusts the allocator code accordingly.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.cpp 1fd8b021c9954c37533dc193b3148def5ff53071

> 
> 
> Diff: https://reviews.apache.org/r/70393/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message