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 70273: Refactored the quota capcity heuristic check to be a static function.
Date Mon, 25 Mar 2019 00:00:27 GMT

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


Ship it!





src/master/quota_handler.cpp
Lines 226-247 (original), 222-243 (patched)
<https://reviews.apache.org/r/70273/#comment300073>

    We should be able to avoid the copies of agent resources and contains checks here by doing
subtraction.
    
    ```
    Resources quota = ... // total quota resources
    
    foreach (const Resources& agent, agents) {
      if (quota.empty()) {
        return None();
      }
    
      quota -= agent;
    }
    
    if (!quota.empty()) {
      return Error.. // Consider add more specific error messages regarding missing resources.
    }
    ```
    
    I see that you added more specifc error messages later where total resources need to be
computed, I will leave this up to you.


- Meng Zhu


On March 22, 2019, 8:54 a.m., Benjamin Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70273/
> -----------------------------------------------------------
> 
> (Updated March 22, 2019, 8:54 a.m.)
> 
> 
> Review request for mesos and Meng Zhu.
> 
> 
> Bugs: MESOS-6840
>     https://issues.apache.org/jira/browse/MESOS-6840
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This allows the capacity heuristic code to be moved up and unit tested.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp 77be494d1ca2d3cd79ab033e41a5ff66c0225f79 
>   src/master/quota_handler.cpp 2dcfdcaf836f21d7d39b5ef5c36de0db25ca7517 
> 
> 
> Diff: https://reviews.apache.org/r/70273/diff/1/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Mahler
> 
>


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