> On Sept. 1, 2016, 5:43 p.m., Jiang Yan Xu wrote:
> > Updated the review with the following changes.
> > 
> > I have already committed all 'resources*.cpp's so they are removed from the 
> > review. 
> > I moved the tests to /r/45962/ so the remainder of the current set of tests 
> > are in one place.
> > 
> > Please take a look.

LGTM, with the small modification in master.cpp.


> On Sept. 1, 2016, 5:43 p.m., Jiang Yan Xu wrote:
> > src/master/master.cpp, lines 3808-3809
> > <https://reviews.apache.org/r/45961/diff/17/?file=1487722#file1487722line3808>
> >
> >     Why the change from `offeredSharedResources = 
> > _offeredResources.shared();`?
> >     
> >     This won't work if `offeredSharedResources` has multiple copies.
> >     
> >     I also changed the CREATE case to be more consistent.

Agreed. For the CREATE, I modified from:
```
offeredSharedResources += _offeredResources.shared();
```

to:

```
offeredSharedResources = _offeredResources.shared();
```


- Anindya


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


On Sept. 6, 2016, 6:13 p.m., Anindya Sinha wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45961/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2016, 6:13 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Joris Van Remoortere, Michael 
> Park, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-4431
>     https://issues.apache.org/jira/browse/MESOS-4431
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> o Each shared resource is accouted via its share count. This count is
>   updated based on the resource operations (such as add and subtract)
>   in various scenarios such as task launch and terminate at multiple
>   modules such as master, allocator, sorter, etc.
> o Only allow DESTROY if there are no running or pending tasks using
>   the volume. However, if the volume is in a pending offer to one or
>   more frameworks, rescind that offer before processing the DESTROY.
> o To allow multiple tasks to be launched in the same ACCEPT call
>   using the same shared resource, we update the allocator and
>   sorter with additional copies of shared resources to reflect the
>   true shared count of allocated shared resources.
> 
> 
> Diffs
> -----
> 
>   src/master/allocator/mesos/hierarchical.hpp 
> dd07ed221d2c1755d2478369641ffdc46ecc4471 
>   src/master/allocator/mesos/hierarchical.cpp 
> 9e5db2196c6a541dc1208ba8b9f13ef9a518bcc4 
>   src/master/allocator/sorter/drf/sorter.hpp 
> 09aa685f2bd7197385959d7d70d5411d0fd72f06 
>   src/master/allocator/sorter/drf/sorter.cpp 
> 1f2954c564eea5a3c649a5cc7181cb69329f9e35 
>   src/master/http.cpp 525ef6cd7545d25f3ac89a6325ace6e6d768262a 
>   src/master/master.hpp c32c7e9d859ef73216354e2c03ecc07d0009b12f 
>   src/master/master.cpp 192b2ce5eb24deb6e843f2f1a8c915114614b268 
>   src/master/validation.hpp 3205ee1e699d0fb7ca16ced96a07be3a07cf8956 
>   src/master/validation.cpp 15e2ecc2de99d6bed522f45f855ba686bf19c008 
> 
> Diff: https://reviews.apache.org/r/45961/diff/
> 
> 
> Testing
> -------
> 
> Tests successful.
> 
> 
> Thanks,
> 
> Anindya Sinha
> 
>

Reply via email to