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


Fix it, then Ship it!





3rdparty/libprocess/include/process/grpc.hpp
Lines 85 (patched)
<https://reviews.apache.org/r/67154/#comment285423>

    We need to `#include <utility>` for `std::move`.



3rdparty/libprocess/include/process/grpc.hpp
Lines 188 (patched)
<https://reviews.apache.org/r/67154/#comment285424>

    Why do we `move` here? It seems both not needed to me as `shared_ptr`'s 
`operator*` returns an lvalue and also potentially like a dangerous antipattern 
since (at least in general) the shared data is not necessarily safe to access 
concurrently.
    
    Please just make a copy here.


- Benjamin Bannier


On May 17, 2018, 12:02 a.m., Chun-Hung Hsiao wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/67154/
> -----------------------------------------------------------
> 
> (Updated May 17, 2018, 12:02 a.m.)
> 
> 
> Review request for mesos, Benjamin Bannier, Benjamin Mahler, Jie Yu, and 
> Zhitao Li.
> 
> 
> Bugs: MESOS-8924
>     https://issues.apache.org/jira/browse/MESOS-8924
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The `process::grpc::client::Runtime::call` method currently returns a
> `RpcResult<Response>`, which contains both a `::grpc::Status` object
> and the resulting response protobuf. However, if the `::grpc::Status`
> represents a non-OK status, the gRPC library does not guarantee that
> the response protobuf is valid. This patch replaces `RpcResult` with
> `Try` to provide better type safety.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/grpc.hpp 
> 321a46e19c69eafb24012bcef68bb8b0cc6aa436 
>   3rdparty/libprocess/src/tests/grpc_tests.cpp 
> 38cd6c61b54518a1019bb11a3551be13026c3f0d 
> 
> 
> Diff: https://reviews.apache.org/r/67154/diff/3/
> 
> 
> Testing
> -------
> 
> make check in libprocess
> 
> NOTE: Mesos cannot be built with this patch standalone. The tests are done 
> later in the chain.
> 
> 
> Thanks,
> 
> Chun-Hung Hsiao
> 
>

Reply via email to