> On Nov. 6, 2019, 1:35 a.m., Greg Mann wrote:
> > src/master/http.cpp
> > Lines 1988 (patched)
> > <https://reviews.apache.org/r/71695/diff/2/?file=2171533#file2171533line1994>
> >
> >     Should this be an Option? Since it isn't, it seems like we will set the 
> > `source` field to a default-constructed value in `_reserve()` when the 
> > operator does not specify that parameter. Would it be better to avoid 
> > setting the `source` field at all in the offer operation if it isn't found 
> > in the query parameters?

As far as I know, there's no difference in the protobuf wire format between an 
unset and a zero-length repeated field. So as soon as we have constructed the 
`Reserve` protobuf inside `_reserve()`, we have no way to distinguish these 
cases anyways.

So the only question seems to be how early we want to forget about whether or 
not `source` was specified, and I opted to do it here for symmetry with how we 
pass `resources`.


- Benno


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


On Nov. 5, 2019, 1:25 p.m., Benno Evers wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71695/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2019, 1:25 p.m.)
> 
> 
> Review request for mesos and Benjamin Bannier.
> 
> 
> Bugs: MESOS-9987 and MESOS-9989
>     https://issues.apache.org/jira/browse/MESOS-9987
>     https://issues.apache.org/jira/browse/MESOS-9989
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated 'Master::Http::_reserve()' to correctly set the new `source`
> field in the `Offer::Operation` created from operator API input.
> 
> 
> Diffs
> -----
> 
>   src/master/http.cpp 60765c9b9d6903f6ed94fa8c614055698caad0da 
>   src/master/master.hpp dc45028d2ecfb61bf9ea82d90d2393af648a6023 
> 
> 
> Diff: https://reviews.apache.org/r/71695/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Benno Evers
> 
>

Reply via email to