> On March 5, 2017, 12:37 p.m., Benjamin Mahler wrote:
> > src/master/master.cpp
> > Lines 401-412 (patched)
> > <https://reviews.apache.org/r/57110/diff/7/?file=1656423#file1656423line401>
> >
> > Since this is effectively `stopTrackingAllocationToRole`, should we be
> > CHECKing the invariants? i.e. that there is no more allocation and that
> > we're not subscribed to the role
I've added `CHECK(roles.count(role) > 0);` to `trackUnderRole`, and
added the following to `untrackUnderRole`:
```cpp
// NOTE: Ideally we would also `CHECK` that we're not currently subscribed
// to the role. We don't do this currently because this function is used in
// `Master::removeFramework` where we're still subscribed to `roles`.
auto allocatedToRole = [&role](const Resource& resource) {
return resource.allocation_info().role() == role;
};
CHECK(totalUsedResources.filter(allocatedToRole).empty());
CHECK(totalOfferedResources.filter(allocatedToRole).empty());
```
> On March 5, 2017, 12:37 p.m., Benjamin Mahler wrote:
> > src/master/quota_handler.cpp
> > Line 135 (original), 135 (patched)
> > <https://reviews.apache.org/r/57110/diff/7/?file=1656424#file1656424line135>
> >
> > Not yours, but do you want commit a change to use .at here?
https://reviews.apache.org/r/57331/
- Michael
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57110/#review167948
-----------------------------------------------------------
On March 6, 2017, 2:57 a.m., Michael Park wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57110/
> -----------------------------------------------------------
>
> (Updated March 6, 2017, 2:57 a.m.)
>
>
> Review request for mesos and Benjamin Mahler.
>
>
> Bugs: MESOS-6627
> https://issues.apache.org/jira/browse/MESOS-6627
>
>
> Repository: mesos
>
>
> Description
> -------
>
> See summary.
>
>
> Diffs
> -----
>
> src/master/master.hpp 81320e0da3a2cd99d8dea1fbea9276296ef9e515
> src/master/master.cpp a15c6d8fb1f99d117eed8e9453a643ec80319a52
>
>
> Diff: https://reviews.apache.org/r/57110/diff/8/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Michael Park
>
>