> On Nov. 19, 2015, 10:39 a.m., Alexander Rukletsov wrote:
> > src/master/quota_handler.cpp, line 195
> > <https://reviews.apache.org/r/39492/diff/3/?file=1126166#file1126166line195>
> >
> >     Am I right that there is another way to achieve the same:
> >     ```
> >     status.mutable_guarantees()->Add()->CopyFrom(quotaInfo.info);
> >     ```
> >     
> >     Do you know what the difference is and what approach is preferable?
> 
> Joerg Schad wrote:
>     Afaik they are equivalent. I would use Add() in cases where have the 
> object anyhow and do not have to get it via mutable_X(). See for example in 
> resources.cpp "resources.Add()->CopyFrom(that)". In cases where I only have 
> access to a sorrounding object (i.e status in this case) I use add_x().

Totally makes sense to me. Thanks!


- Alexander


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


On Nov. 19, 2015, 12:44 p.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39492/
> -----------------------------------------------------------
> 
> (Updated Nov. 19, 2015, 12:44 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Bernd Mathiske, and Joris Van 
> Remoortere.
> 
> 
> Bugs: MESOS-3073
>     https://issues.apache.org/jira/browse/MESOS-3073
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added status handling for quota master endpoint.
> 
> 
> Diffs
> -----
> 
>   include/mesos/quota/quota.proto 4e4d8ccc92e2bf9a8e5eae8488c0c952f82fdd6d 
>   src/master/master.hpp 5e5a575dc7dd49324f3c837028df8a7f75cd1f80 
>   src/master/quota_handler.cpp 03cef4117c52da7599a2800060f65483ca33bc3f 
> 
> Diff: https://reviews.apache.org/r/39492/diff/
> 
> 
> Testing
> -------
> 
> Tests are in next Review.
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>

Reply via email to