hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Enis Soztutar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17800) [C++] handle exceptions in client RPC
Date Sat, 25 Mar 2017 00:42:41 GMT

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

Enis Soztutar commented on HBASE-17800:

Thanks for the patch. 
Is this an overkill for the builder? It means that the exception can only be saved in a shared_ptr.
Maybe the set_foo() methods return a raw pointer, so that we can have the same Builder style,
but without inheriting from enable_shared_from_this. 
+class RemoteException : public IOException, std::enable_shared_from_this<

Do we need the dynamic pointer cast here: 
+      received->set_exception(dynamic_pointer_cast<std::exception>(remote_exception));
shared_ptr<RemoteException> is already instance of shared_ptr<std::exception>
Otherwise looks good. Will need a test for this. 

> [C++] handle exceptions in client RPC
> -------------------------------------
>                 Key: HBASE-17800
>                 URL: https://issues.apache.org/jira/browse/HBASE-17800
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Xiaobing Zhou
>            Assignee: Xiaobing Zhou
>         Attachments: HBASE-17800-HBASE-14850.000.patch, HBASE-17800-HBASE-14850.001.patch
> Exceptions are ignored in current client RPC. They should be handled properly to be consumed
by RPC retry or propagated up to APIs.

This message was sent by Atlassian JIRA

View raw message