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


Looks good.  Just address the lack-of-comment as Klaus pointed out.


src/common/resources.cpp (lines 712 - 723)
<https://reviews.apache.org/r/41334/#comment173607>

    Suggestion:
    ```
    if (role.isSome() && role.get() != resource.role()) {
      return false;
    }
    
    return resource.revocable().type() == 
Resource::RevocableInfo::ALLOCATION_SLACK
    ```
    
    Note: `type()` has a default, so you don't need to check `has_type()`.


- Joseph Wu


On Jan. 1, 2016, 5:14 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41334/
> -----------------------------------------------------------
> 
> (Updated Jan. 1, 2016, 5:14 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van 
> Remoortere, Joseph Wu, and Klaus Ma.
> 
> 
> Bugs: MESOS-4146
>     https://issues.apache.org/jira/browse/MESOS-4146
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This helper function is used to filter out allocation slack resources.
> 
> 
> Diffs
> -----
> 
>   include/mesos/resources.hpp 9c8bfb0e7e1e40ca99b4cc75079e5b950630243d 
>   include/mesos/v1/resources.hpp db87c992e2ec466cb1d4d17775bf6423a2fb15aa 
>   src/common/resources.cpp b9d31aef8babee212374e352c57fadbff02167f3 
>   src/tests/resources_tests.cpp e4a3435adc14f3b6b278b32348a6991543d5a320 
>   src/v1/resources.cpp 0c0eee6b3b7ae3254d7dc7b06187855c9b873764 
> 
> Diff: https://reviews.apache.org/r/41334/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>

Reply via email to