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



src/master/master.cpp
<https://reviews.apache.org/r/30694/#comment116990>

    Hm.. relying on this error to determine whether the volume applies to 
checkpointed resources seems a bit implicit. How do we know it's not due to 
some other error? :)
    
    Have you considered something like the following approach:
    
    ```
    // There should be an easy way to get the slave's current total resources
    // (checkpointed + non-checkpointed) since we likely need to use this
    // elsewhere too (e.g. http endpoints).
    Resources slaveResources; // checkpointed + non-checkopinted
    
    // Add the volumes.
    Try<Resources> resources = slaveResources.apply(operation.create());
    
    CHECK_SOME(resources);
    
    slaveResources = resources.get();
    slave->checkpointedResources = slaveResources.filter(checkpointFilter);
    ```
    
    This approach should work for the DESTROY case as well, thoughts?


- Ben Mahler


On Feb. 5, 2015, 8:52 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30694/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2015, 8:52 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Bugs: MESOS-2100
>     https://issues.apache.org/jira/browse/MESOS-2100
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Fixed bugs in CREATE/DESTROY operation handlers and added tests.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 93537d17d3c7604a8532ee1453e405630c481ddc 
>   src/master/master.cpp 234bbecc4205036d790b026abd59100eb188f913 
>   src/tests/persistent_volume_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/30694/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>

Reply via email to