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

stack commented on HBASE-7533:
------------------------------

Thanks for bringing this up now [~enis]

bq.  i guess this is not handled at the attached spec as well.

Correct.

Current implementation is like the old where a flag is set in header to say 
Call failed and then caller reads the Stringified exception and throws the 
wrapper exception.

There are a few types of exception currently: 1. A fatal exception kills the 
connection (bad auth, wrong rpc version), and 2. an exception that just fails 
the particular call and we keep going w/ outstanding calls.  Now we have a 
third type, one that is to carry pb data.

Messing w/ Elliott, given our rpc now does a request that takes a single pb 
Message and returns a single pb Message response, we toyed w/ making it so 
every Message was a union; either a response or an exception.  Undoing the 
response you'd test if it an exception and act accordingly, otherwise, process 
the response.  This would seem to be how the google fellas would have you do it 
(according to old blog response, see #9 response here 
http://steve.vinoski.net/blog/2008/07/13/protocol-buffers-leaky-rpc/).  We 
chose not to edit all 55 response types so they could take an exception instead 
and if we did, there'd still be the type #1 and #2s above (The type #2s could 
probably be corralled as legit exception responses).

How about we try your alternate proposal for now.  I think the tendency will be 
to evolve all rpc in this direction eventually.  It would avoid a bunch of code 
change just now.  On other hand, it makes our spec. messier allowing 3 types of 
exception rather than two (I started an Exceptions section in spec; it needs 
filling out still).

What you reckon?
                
> Write an RPC Specification for 0.96
> -----------------------------------
>
>                 Key: HBASE-7533
>                 URL: https://issues.apache.org/jira/browse/HBASE-7533
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.96.0
>
>         Attachments: 7533_proto_sketch.txt
>
>
> RPC format is changing for 0.96 to accomodate our protobufing all around.  
> Here is a first cut.  Please shred: 
> https://docs.google.com/document/d/1-1RJMLXzYldmHgKP7M7ynK6euRpucD03fZ603DlZfGI/edit

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to