mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qian Zhang <zhq527...@gmail.com>
Subject Re: Review Request 59987: Added protobuf map support.
Date Mon, 26 Feb 2018 09:01:22 GMT


> On Feb. 9, 2018, 4:26 a.m., Chun-Hung Hsiao wrote:
> > 3rdparty/stout/include/stout/protobuf.hpp
> > Lines 499-500 (patched)
> > <https://reviews.apache.org/r/59987/diff/4/?file=1925720#file1925720line499>
> >
> >     How about using `UNREACHABLE` instead?

With `ABORT`, we can output `key_field->type()` which will be helpful for debugging purpose,
but we cannot do it with `UNREACHABLE`. So I would still prefer `ABORT`.


> On Feb. 9, 2018, 4:26 a.m., Chun-Hung Hsiao wrote:
> > 3rdparty/stout/include/stout/protobuf.hpp
> > Lines 502-503 (patched)
> > <https://reviews.apache.org/r/59987/diff/4/?file=1925720#file1925720line502>
> >
> >     Deprecated or not, it cannot be the type of a key, so let's merge this case
with the above cases.

Agree!


> On Feb. 9, 2018, 4:26 a.m., Chun-Hung Hsiao wrote:
> > 3rdparty/stout/include/stout/protobuf.hpp
> > Lines 1045-1046 (patched)
> > <https://reviews.apache.org/r/59987/diff/4/?file=1925720#file1925720line1046>
> >
> >     Ditto.

With `ABORT`, we can output `key_field->type()` which will be helpful for debugging purpose,
but we cannot do it with `UNREACHABLE`. So I would still prefer `ABORT`.


> On Feb. 9, 2018, 4:26 a.m., Chun-Hung Hsiao wrote:
> > 3rdparty/stout/include/stout/protobuf.hpp
> > Lines 1113-1114 (patched)
> > <https://reviews.apache.org/r/59987/diff/4/?file=1925720#file1925720line1114>
> >
> >     Since stout is positioned as a standalone library, we should return an error
indicating that this is not supported instead of arbitrarily terminate the program.

I think the reason we do not return error is this code should never be called, otherwise that
means something really bad happens which is not a normal error that we should return. Actually
in stout, `ABORT` and `UNREACHABLE` are widely used when an unrecoverable issue occurs.


- Qian


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


On Dec. 21, 2017, 10:07 a.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59987/
> -----------------------------------------------------------
> 
> (Updated Dec. 21, 2017, 10:07 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, Chun-Hung Hsiao, and Zhitao Li.
> 
> 
> Bugs: MESOS-7656
>     https://issues.apache.org/jira/browse/MESOS-7656
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Map is a feature of proto2 syntax, but it can only be compiled
> with proto3 compiler, see the following discussion for details:
> https://groups.google.com/forum/#!topic/protobuf/p4WxcplrlA4
> We have already upgraded the compiler from 2.6.1 to 3.3.0 in
> MESOS-7228, however, to use protobuf map in Mesos code, we also
> need to add the protobuf map support to the code in Mesos for
> converting protobuf message to JSON object and parsing JSON
> object as protobuf message, that is what I have done in this patch.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/protobuf.hpp baad12648dd78ab72ea4277f4c7f99da16696a40

> 
> 
> Diff: https://reviews.apache.org/r/59987/diff/4/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


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