[ 
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. 
{code}
+class RemoteException : public IOException, std::enable_shared_from_this<
{code}

Do we need the dynamic pointer cast here: 
{code}
+      
received->set_exception(dynamic_pointer_cast<std::exception>(remote_exception));
{code} 
shared_ptr<RemoteException> is already instance of shared_ptr<std::exception> 
no? 
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
(v6.3.15#6346)

Reply via email to