[
https://issues.apache.org/jira/browse/MESOS-8924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16488208#comment-16488208
]
Chun-Hung Hsiao commented on MESOS-8924:
----------------------------------------
The following patches are submitted:
{noformat}
commit 9a94eb697f8a7b38955cdf2f21b81d3fda3e2845
Author: Chun-Hung Hsiao <[email protected]>
Date: Mon May 14 22:00:35 2018 -0700
Replaced `RpcResult<Response>` with `Try<Response, StatusError>`.
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.
Review: https://reviews.apache.org/r/67154{noformat}
{noformat}
commit 3bac270b0ed99315edf72d24653c1cb068247c20
Author: Chun-Hung Hsiao <[email protected]>
Date: Tue May 15 16:43:33 2018 -0700
Renamed `GRPC_RPC` and adapted the new gRPC async API.
To better describe the `GRPC_RPC` macro and to avoid future name
conflicts, we renamed it to `GRPC_CLIENT_METHOD`. Additionally,
we adapted the new gRPC asynchronous client API. See:
https://github.com/grpc/grpc/pull/12269
We also introduced the `MethodTraits` internal helper to simplify the
declaration of `Runtime::call`.
Review: https://reviews.apache.org/r/67155{noformat}
{noformat}
commit ddfea093f576cdd22d4fa221326406eaf8e59b49
Author: Chun-Hung Hsiao <[email protected]>
Date: Tue May 15 17:54:24 2018 -0700
Renamed `grpc::Channel` to `grpc::client::Connection`.
This renaming is made to avoid name conflicts between `::grpc::Channel`
and libprocess' own wrapper. Also, since this wrapper is only used
at the client side, it is moved into the `client` namespace.
Review: https://reviews.apache.org/r/67156{noformat}
{noformat}
commit 3d2a1fd49dfe0325f4ca94e3abbab97366bcebd0
Author: Chun-Hung Hsiao <[email protected]>
Date: Wed May 16 12:10:10 2018 -0700
Updated the CSI client to use the new libprocess gRPC interface.
This patch makes the following changes:
1. Replace `GRPC_RPC` with `GRPC_CLIENT_METHOD`.
2. Replace `process::grpc::Channel` with
`process::grpc::client::Connection`.
3. Make the CSI client metods return a `Future` of a `Try`.
Review: https://reviews.apache.org/r/67158{noformat}
> Refactor the libprocess gRPC warpper.
> -------------------------------------
>
> Key: MESOS-8924
> URL: https://issues.apache.org/jira/browse/MESOS-8924
> Project: Mesos
> Issue Type: Improvement
> Components: libprocess
> Reporter: Chun-Hung Hsiao
> Assignee: Chun-Hung Hsiao
> Priority: Major
> Labels: mesosphere, storage
>
> Refactor {{process::grpc::client::Runtime}} for better naming and interface,
> and fewer synchronizations.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)