> On Dec. 24, 2014, 1:20 a.m., Adam B wrote:
> > src/slave/slave.cpp, lines 2661-2664
> > <https://reviews.apache.org/r/28063/diff/5/?file=799499#file799499line2661>
> >
> >     Why not take `flags` as a parameter too? Then setGracePeriod(task, 
> > flags) or setGracePeriod(task, grace_period) could be a static method that 
> > doesn't even need to live on `Slave`.
> 
> Alexander Rukletsov wrote:
>     This sounds reasonable. I suggest to introduce `enforceGracePeriod(task, 
> grace_period)` in `common/protobuf_utils.{hpp|cpp}`. Does it make sense?
> 
> Adam B wrote:
>     Do we really expect this method to be used anywhere outside of this one 
> place in slave.cpp? If so, let's move it to protobuf_utils. If not, let's 
> keep it hidden in slave.cpp until it becomes more widely used.

Generalizing it for then requiring slave::flags (which it needs to be) - I am 
not a fan :-/ Keep it local.


> On Dec. 24, 2014, 1:20 a.m., Adam B wrote:
> > src/slave/slave.cpp, lines 1159-1160
> > <https://reviews.apache.org/r/28063/diff/5/?file=799499#file799499line1159>
> >
> >     I feel like 'setGracePeriod' is inaccurate if it doesn't always set it 
> > (when already set). Maybe 'updateGracePeriod' or 'enforceGracePeriod' or 
> > 'mergeGracePeriod'? You can probably come up with something better.
> 
> Alexander Rukletsov wrote:
>     Currently, the function always sets the grace period. However, this may 
> change in the future. I tend to agree and go for `enforceGracePeriod()`. What 
> do you think?
> 
> Adam B wrote:
>     Call it overrideGracePeriod until you fix that TODO and allow already-set 
> values to survive. At that point, you can rename it to something more 
> accurate (I still think there's gotta be a better name out there).

Let's go with 'updateGracePeriod' - 'enforcing' is confusing.


- Niklas


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


On Dec. 23, 2014, 7:25 a.m., Alexander Rukletsov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28063/
> -----------------------------------------------------------
> 
> (Updated Dec. 23, 2014, 7:25 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Niklas Nielsen, and Till Toenshoff.
> 
> 
> Bugs: MESOS-1571
>     https://issues.apache.org/jira/browse/MESOS-1571
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> CommandExecutor grace_period field is designed to be used by slave to 
> propagate the value of the grace period flag further to containerizers and 
> executors.
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto 0085aba 
>   src/slave/slave.hpp 70bd8c1 
>   src/slave/slave.cpp ed63ded 
> 
> Diff: https://reviews.apache.org/r/28063/diff/
> 
> 
> Testing
> -------
> 
> make check (Mac OS 10.9.4, Ubuntu 14.04)
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>

Reply via email to