You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Dominic Hamon <dh...@twopensource.com> on 2014/02/24 20:54:50 UTC

Review Request 18434: Changed Result::get to return const reference.

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

Review request for mesos and Ben Mahler.


Bugs: MESOS-1008
    https://issues.apache.org/jira/browse/MESOS-1008


Repository: mesos-git


Description
-------

See summary


Diffs
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 

Diff: https://reviews.apache.org/r/18434/diff/


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Dominic Hamon <dh...@twopensource.com>.

> On Feb. 25, 2014, 11:55 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp, line 112
> > <https://reviews.apache.org/r/18434/diff/3/?file=503046#file503046line112>
> >
> >     I'm hesitant to use fatal() here because fatal exits via exit(1), we won't get a stacktrace if this occurs in mesos.
> >     
> >     Previously we were using abort(), which results in a SIGABRT and for mesos, SIGABRT results in a nice stacktrace (see logging.cpp for where we set this up).

any reason not to move fatal() to use abort() then?


- Dominic


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


On Feb. 25, 2014, 1:40 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18434/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 1:40 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-1008
>     https://issues.apache.org/jira/browse/MESOS-1008
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
> 
> Diff: https://reviews.apache.org/r/18434/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Ben Mahler <be...@gmail.com>.

> On Feb. 25, 2014, 7:55 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp, line 112
> > <https://reviews.apache.org/r/18434/diff/3/?file=503046#file503046line112>
> >
> >     I'm hesitant to use fatal() here because fatal exits via exit(1), we won't get a stacktrace if this occurs in mesos.
> >     
> >     Previously we were using abort(), which results in a SIGABRT and for mesos, SIGABRT results in a nice stacktrace (see logging.cpp for where we set this up).
> 
> Dominic Hamon wrote:
>     any reason not to move fatal() to use abort() then?
>

Sounds good to me, probably best to take that up in a separate patch so we can clean up the asserts in all of {Try, Result, Option} at once.


- Ben


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


On Feb. 25, 2014, 9:40 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18434/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 9:40 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-1008
>     https://issues.apache.org/jira/browse/MESOS-1008
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
> 
> Diff: https://reviews.apache.org/r/18434/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/#review35448
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp
<https://reviews.apache.org/r/18434/#comment65973>

    Maybe some parens here for readability?
    
    t = (that.t == NULL ? NULL : new T(*that.t));
    
    I realize they are unnecessary but I had to stop and think about this line to consider operator precedence when I first glanced at it.
    
    Ditto below.



3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp
<https://reviews.apache.org/r/18434/#comment65967>

    I'm hesitant to use fatal() here because fatal exits via exit(1), we won't get a stacktrace if this occurs in mesos.
    
    Previously we were using abort(), which results in a SIGABRT and for mesos, SIGABRT results in a nice stacktrace (see logging.cpp for where we set this up).



3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp
<https://reviews.apache.org/r/18434/#comment65968>

    Can we make the error() optimization in a separate patch?


- Ben Mahler


On Feb. 25, 2014, 1:18 a.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18434/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 1:18 a.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-1008
>     https://issues.apache.org/jira/browse/MESOS-1008
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
> 
> Diff: https://reviews.apache.org/r/18434/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Dominic Hamon <dh...@twopensource.com>.

> On March 3, 2014, 12:29 p.m., Ben Mahler wrote:
> > Were there any changes to libprocess / mesos needed for this one?

No


- Dominic


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


On Feb. 27, 2014, 10:46 a.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18434/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2014, 10:46 a.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-1008
>     https://issues.apache.org/jira/browse/MESOS-1008
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
> 
> Diff: https://reviews.apache.org/r/18434/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/#review36022
-----------------------------------------------------------


Were there any changes to libprocess / mesos needed for this one?

- Ben Mahler


On Feb. 27, 2014, 6:46 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18434/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2014, 6:46 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-1008
>     https://issues.apache.org/jira/browse/MESOS-1008
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
> 
> Diff: https://reviews.apache.org/r/18434/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/
-----------------------------------------------------------

(Updated Feb. 27, 2014, 10:46 a.m.)


Review request for mesos and Ben Mahler.


Bugs: MESOS-1008
    https://issues.apache.org/jira/browse/MESOS-1008


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 

Diff: https://reviews.apache.org/r/18434/diff/


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/#review35665
-----------------------------------------------------------

Ship it!



3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp
<https://reviews.apache.org/r/18434/#comment66297>

    Looks like we need to restore the headers back now that we reverted the calls to fatal()?


- Ben Mahler


On Feb. 25, 2014, 11:16 p.m., Dominic Hamon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18434/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2014, 11:16 p.m.)
> 
> 
> Review request for mesos and Ben Mahler.
> 
> 
> Bugs: MESOS-1008
>     https://issues.apache.org/jira/browse/MESOS-1008
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 
> 
> Diff: https://reviews.apache.org/r/18434/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Dominic Hamon
> 
>


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/
-----------------------------------------------------------

(Updated Feb. 25, 2014, 3:16 p.m.)


Review request for mesos and Ben Mahler.


Bugs: MESOS-1008
    https://issues.apache.org/jira/browse/MESOS-1008


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 

Diff: https://reviews.apache.org/r/18434/diff/


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/
-----------------------------------------------------------

(Updated Feb. 25, 2014, 1:40 p.m.)


Review request for mesos and Ben Mahler.


Bugs: MESOS-1008
    https://issues.apache.org/jira/browse/MESOS-1008


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 

Diff: https://reviews.apache.org/r/18434/diff/


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/
-----------------------------------------------------------

(Updated Feb. 24, 2014, 5:18 p.m.)


Review request for mesos and Ben Mahler.


Bugs: MESOS-1008
    https://issues.apache.org/jira/browse/MESOS-1008


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 

Diff: https://reviews.apache.org/r/18434/diff/


Testing
-------

make check


Thanks,

Dominic Hamon


Re: Review Request 18434: Changed Result::get to return const reference.

Posted by Dominic Hamon <dh...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18434/
-----------------------------------------------------------

(Updated Feb. 24, 2014, 2:01 p.m.)


Review request for mesos and Ben Mahler.


Bugs: MESOS-1008
    https://issues.apache.org/jira/browse/MESOS-1008


Repository: mesos-git


Description
-------

See summary


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/stout/include/stout/result.hpp 951a1136f0aa7d8ab156c09e76bbae1bc84924a2 

Diff: https://reviews.apache.org/r/18434/diff/


Testing
-------

make check


Thanks,

Dominic Hamon