> On April 11, 2018, 2:47 p.m., Jan Schlicht wrote:
> > src/resource_provider/manager.cpp
> > Lines 668 (patched)
> > <https://reviews.apache.org/r/66545/diff/1/?file=1995469#file1995469line668>
> >
> > Shouldn't this be `false` here? If there's no registrar to admit a resource
provider to, a resource provider cannot be admitted.
Semantically we want to treat operation on a non-existing registrar as always successful,
so this needs to be a `true`. I some comments.
> On April 11, 2018, 2:47 p.m., Jan Schlicht wrote:
> > src/resource_provider/manager.cpp
> > Lines 679-683 (patched)
> > <https://reviews.apache.org/r/66545/diff/1/?file=1995469#file1995469line679>
> >
> > We should set this event handler before setting `admitResourceProvider` to any
value, i.e. set this directly after instanciation.
I agree that this would read better and not alter the behavior of the `Future`. Unfortunately
we still need to mutate `resourceProvider` -- namely possibly assign a `ResourceProviderID`.
Since the continuation takes ownership of `resourceProvider` we wouldn't be able to `move`
data before setting it, and I don't feel that introducing splitting generating an `ResourceProviderID`
and setting up actions on the `Registrar` would make things much clearer either.
I'd suggest we keep the code as is.
- Benjamin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66545/#review200903
-----------------------------------------------------------
On April 12, 2018, 11:48 a.m., Benjamin Bannier wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66545/
> -----------------------------------------------------------
>
> (Updated April 12, 2018, 11:48 a.m.)
>
>
> Review request for mesos, Chun-Hung Hsiao, Greg Mann, and Jan Schlicht.
>
>
> Bugs: MESOS-8402
> https://issues.apache.org/jira/browse/MESOS-8402
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added admitted resource providers to the manager's registry.
>
>
> Diffs
> -----
>
> src/resource_provider/manager.cpp 68e1866986bfb91bf8355099ee1f0a2a86aba39a
> src/resource_provider/registrar.cpp 92ef9aecb1e93d10f46e53984391558f9901a60b
> src/resource_provider/registry.proto 14bd433ef056f8891e9a38153fdb06c39cee8f62
> src/tests/resource_provider_manager_tests.cpp c52541bf130ccf4795b989b53331176a64a097ea
>
>
> Diff: https://reviews.apache.org/r/66545/diff/3/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Benjamin Bannier
>
>
|