hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiaobing Zhou (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18078) [C++] Harden RPC by handling various communication abnormalities
Date Fri, 26 May 2017 05:12:04 GMT

    [ https://issues.apache.org/jira/browse/HBASE-18078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16025812#comment-16025812

Xiaobing Zhou commented on HBASE-18078:

Posted v0 patch to handle connection related issues, such as timeout.

The idea is to catch and propagate ConnectionException up. Therefore, from bottom of stack,
whatever issues from establishing connection (i.e. Wangle pipeline) will be folly::AsyncSocketException
wrapped within ConnectionException.

Note that there's no way to set socket options in Wangle ClientBootstrap, but fortunately,
ClientBootstrap::connect supports setting our own timeout which is enough for now.

See also ConnectionFactory::Connect
try {
	  /* any connection error (e.g. timeout) will be folly::AsyncSocketException */
    auto pipeline = client->connect(
        SocketAddress(hostname, port, true),
    auto dispatcher = std::make_shared<ClientDispatcher>();
	} catch(const folly::AsyncSocketException &e) {

> [C++] Harden RPC by handling various communication abnormalities
> ----------------------------------------------------------------
>                 Key: HBASE-18078
>                 URL: https://issues.apache.org/jira/browse/HBASE-18078
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HBASE-18078.000.patch
> RPC layer should handle various communication abnormalities (e.g. connection timeout,
server aborted connection, and so on). Ideally, the corresponding exceptions should be raised
and propagated through handlers of pipeline in client.

This message was sent by Atlassian JIRA

View raw message