> On May 7, 2015, 8:37 a.m., Adam B wrote:
> > Thanks for attacking one of my TODOs. I've got a couple of questions, but 
> > it looks pretty straightforward to me.
> > 
> > I'm confused about when `==` would be too strict. What fields would you 
> > expect to differ? Maybe if you got a TASK_LOST followed by a TASK_FAILED 
> > for the same taskId, as is supposedly possible in some weird race? 
> > https://github.com/apache/mesos/blob/master/src/master/master.cpp#L3738
> > 
> > Testing:
> > It's probably unfair to link to a private mesosphere-only build result in 
> > your Testing section.
> > Did the buildbot pass `make distcheck` as well as just `make check`?
> > Is there a unit test to verify your change? Do we need one?
> > 
> > I have yet to learn what our recommended coding style is for lambdas now, 
> > so I'll defer to @jvanremoortere for his approval there.

This was more a question I was pondering myself: the current `==` does a 
"bitwise" comparison of two `Task` objects; my question was around the 
"semantic" meaning of equality for two `Task`s: are they *equal* if and only if 
they are *identical*, or is there a narrower definition of *equality* (eg, at 
one extreme, one could just use the `Task::task_id` and ignore all other 
fields).

In fact, in this case, should we just do that? (it would certainly address 
somewhat, if not entirely, your other concern about performance impact)


- Marco


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


On May 7, 2015, 8:26 a.m., Marco Massenzio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33490/
> -----------------------------------------------------------
> 
> (Updated May 7, 2015, 8:26 a.m.)
> 
> 
> Review request for mesos, Adam B and Joris Van Remoortere.
> 
> 
> Bugs: MESOS-2633
>     https://issues.apache.org/jira/browse/MESOS-2633
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> In Framework::addCompletedTask(const Task& task) we did not check
> for duplicated tasks, so they could be added more than once.
> 
> A simple check has now been added (there still is the issue
> of whether the `operator ==` on `Task` is too strict, so as
> never to cause a match).
> 
> 
> Diffs
> -----
> 
>   src/master/framework.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33490/diff/
> 
> 
> Testing
> -------
> 
> buildbot make check pass
> http://build.mesosphere.com:5555/builders/dev_test/builds/13
> 
> 
> Thanks,
> 
> Marco Massenzio
> 
>

Reply via email to