mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Rukletsov" <a...@mesosphere.io>
Subject Re: Review Request 31011: Changed comparison for CommandInfo to consider shell default value.
Date Fri, 06 Mar 2015 16:39:44 GMT


> On Feb. 23, 2015, 8:49 p.m., Ben Mahler wrote:
> > src/common/type_utils.cpp, lines 63-65
> > <https://reviews.apache.org/r/31011/diff/4/?file=867675#file867675line63>
> >
> >     Does the reflection API support getting default values? (possibly workable w/o
direct default support)
> >     
> >     Does comparing the serialization of two messages compensate for defaults? (I
doubt it).
> >     
> >     I want to make sure we're not setting ourselves up to have to write these manual
equality checkers for all of our protobufs instead of using generic reflection or serialization
based equality.
> >     
> >     What's the plan?
> 
> Joerg Schad wrote:
>     Comparing the serialization of two messages will not work as optional default values
are serialized (see https://code.google.com/p/protobuf-c/wiki/Default_Values) only if the
has_flag is set. 
>     I will have a look at the reflection API.
>     
>     From looking at the code we currently compare different protobuf messages at very
different levels. E.g. the comparison for the framework messages only considers the name and
user (see reply to Zameer Manji above) while for the CommandInfo we go much deeper. So we
would first have to define a common notion of equivalence before automating the comparison.
> 
> Joerg Schad wrote:
>     Actually in my opinion reworking the comparison code (to avoid the manual checkers)
is a good to do, but will require some more discussion (right now not even sure whether this
is possible as we have very different notions of equality between different protobuf) and
should require another Jira.

I think we should distinguish between equality and equivalence here. The notion of equivalence
is different from protobuf to protobuf and therefore we won't avoid writing checkers manually.


- Alexander


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


On Feb. 18, 2015, 11:32 a.m., Joerg Schad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31011/
> -----------------------------------------------------------
> 
> (Updated Feb. 18, 2015, 11:32 a.m.)
> 
> 
> Review request for mesos and Till Toenshoff.
> 
> 
> Bugs: MESOS-2309
>     https://issues.apache.org/jira/browse/MESOS-2309
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Changed comparison for CommandInfo to consider shell default value.
> 
> 
> Diffs
> -----
> 
>   src/common/type_utils.cpp 12a36bbd7d7773b25dedf2d0d951c79e0b5141d6 
> 
> Diff: https://reviews.apache.org/r/31011/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joerg Schad
> 
>


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