> On Dec. 30, 2015, 7:25 p.m., Jojy Varghese wrote:
> > src/executor/executor.cpp, line 229
> > <https://reviews.apache.org/r/41283/diff/4/?file=1178062#file1178062line229>
> >
> >     We should probably limit the max value here.

Does not make much sense to me. We do not have any semantics in our code 
historically to define a maximum value for most values of `Flags` passed to 
Executor/Agent. Why bother setting a maximum here. What am I missing ?

Also, these flags are passed on by the agent to the executor and are not 
invalid user inputs.


> On Dec. 30, 2015, 7:25 p.m., Jojy Varghese wrote:
> > src/executor/executor.cpp, line 244
> > <https://reviews.apache.org/r/41283/diff/4/?file=1178062#file1178062line244>
> >
> >     Whats the maximum value allowed here? Might be a good idea to have it 
> > bounded.
> >     
> >     Also what is the unit of time here?

Again, did not make any sense to me. How does it matter ? 

It's pretty self-explantory to see that `maxBackoff` is a `Duration` object and 
hence can take any unit of time allowed by the `Duration` object.


> On Dec. 30, 2015, 7:25 p.m., Jojy Varghese wrote:
> > src/executor/executor.cpp, line 370
> > <https://reviews.apache.org/r/41283/diff/4/?file=1178062#file1178062line370>
> >
> >     Have we considered using ```%``` operator to achieve the same 
> > semantics? Couple of reasons:
> >     
> >     - Expresses the semantics in simple manner.
> >     - Efficient in terms if number of instructions (1 DIV operation vs a 
> > DIV + MUL)

I am assuming you were speaking about a previous issue that I had dropped:

`backoff = ::random() % maxBackoff + 1`

^ This is also 2 instructions (`%` and `+`). Also, considering `modulo` is a 
more expensive operation then division or multiplication. This does not make 
any sense to me. What would we gain ?

Also, We have been using this approach at 99 other places and I would any day 
trade consistency in our code then gaining an iota in performance ( a gain that 
I still do not see )
https://github.com/apache/mesos/blob/master/src/slave/slave.cpp#L740
https://github.com/apache/mesos/blob/master/src/slave/slave.cpp#L1252
https://github.com/apache/mesos/blob/master/src/sched/sched.cpp#L745
... and a zillion others.


> On Dec. 30, 2015, 7:25 p.m., Jojy Varghese wrote:
> > src/executor/executor.cpp, line 291
> > <https://reviews.apache.org/r/41283/diff/4/?file=1178062#file1178062line291>
> >
> >     Have we considered using ```override``` keyword here?

Good idea. We might consider using it widely in our code in the future as we 
become more C++11.


- Anand


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


On Dec. 30, 2015, 1:30 a.m., Anand Mazumdar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41283/
> -----------------------------------------------------------
> 
> (Updated Dec. 30, 2015, 1:30 a.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-3550
>     https://issues.apache.org/jira/browse/MESOS-3550
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This change introduces the implementation for the executor library. 
> 
> This uses the new HTTP Connection interface to ensure calls are properly 
> pipelined.
> 
> `connected` -> Callback invoked when a TCP connection is established with the 
> agent.
> `disconnected` -> When the TCP connection is interrupted possibly due to an 
> agent restart.
> `received` -> When the executor receives events from the agent upon 
> subscribing.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 9762f8567e32d70b8df2d694a1fef5c692fc730e 
>   src/executor/executor.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41283/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Anand Mazumdar
> 
>

Reply via email to