mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bannier" <benjamin.bann...@mesosphere.io>
Subject Re: Review Request 41593: Added `jsonify` function to stout.
Date Wed, 06 Jan 2016 09:48:04 GMT


> On Jan. 5, 2016, 10:28 a.m., Benjamin Bannier wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp, line 107
> > <https://reviews.apache.org/r/41593/diff/13/?file=1181157#file1181157line107>
> >
> >     Here and in all dtrs below: Given that we don't know whether exceptions are
enabled for `stream` (this is stout), could we wrap this in a `try` block?, e.g., imagine
an underlying `fstream` becoming `bad` because there is no space left on the device.
> 
> Michael Park wrote:
>     Hm... that's a good point. I'm not particularly worried about it for our use case
since we don't use exception-enabled streams but it is an issue in the general case. One approach
would be to make it a requirement that the stream not be exception-enabled (We can `CHECK`
this on construction). If we were to wrap it in a `try` block, the best we can do is swallow
the exception with no way to propagate the information which is generally a bad idea...

AFAICT there is no race-free way to `CHECK` that exceptions on `stream` are disabled, so it
seems like one would need to fix this by violently documenting a pre-condition.

Not sure how easy it would be to adjust the existing design, but one could imagine closing
the semantic brackets (currently in dtrs) from some `finalize` method (phooey!). If something
threw from there users could either catch or just `terminate`, but at least we wouldn't summon
UB.


- Benjamin


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


On Jan. 5, 2016, 11:38 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41593/
> -----------------------------------------------------------
> 
> (Updated Jan. 5, 2016, 11:38 p.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 5ab7bc4966fe32eaddd573a4dbfd997f98b5d481

>   3rdparty/libprocess/3rdparty/stout/README.md a2a3dc6120b10c8fe82088b9f0ebecfa5642f945

>   3rdparty/libprocess/3rdparty/stout/include/Makefile.am b2dea9b93adfa3ea0415a0b5c81a369dd29b6cfe

>   3rdparty/libprocess/3rdparty/stout/include/stout/jsonify.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/include/stout/protobuf.hpp 98ea47794b3a7c99b3cbd2418ba6e36eb5951259

>   3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt 62ad461eb228b688f1ceac16cfb003561ed5a806

>   3rdparty/libprocess/3rdparty/stout/tests/jsonify_tests.cpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp bf2a2b8a9f67c6a4cf66b156b9c14fae015a8af0

> 
> Diff: https://reviews.apache.org/r/41593/diff/
> 
> 
> Testing
> -------
> 
> Added tests to `<stout/jsonify_tests.cpp>`
> 
> 
> Thanks,
> 
> Michael Park
> 
>


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