mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benno Evers <bev...@mesosphere.com>
Subject Re: Review Request 71695: Updated 'Master::Http::_reserve' to pass along new 'source' field.
Date Wed, 06 Nov 2019 13:39:03 GMT


> 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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message