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

Andrew Purtell commented on HBASE-4014:
---------------------------------------

@Eugene Your patch doesn't do what was described in earlier comments on this 
issue. Instead it tidies up how exception handling is done in the coprocessor 
framework. But actually I think it achieves the intent here without touching 
code "outside" the coprocessor framework as a bonus, so I'm happy to +1 this 
approach. 

But you cannot catch all exceptions and abort. This breaks AccessController for 
example -- with this patch in place an {{AccessDeniedException}} would abort 
the RegionServer or Master process. There are many valid cases where a 
coprocessor will want to throw an exception back to the client. Instead, you 
should:

- Replace all instances of {{catch (Exception e)}} with {{catch (Throwable t)}}

- Rethrow any {{java.lang.IOException}} or subclass thereof, testing with the 
instanceof operator. 

- Otherwise call {{abort()}}

This perpetuates the HBase idiom that {{IOException}} is special and all user 
exceptions must be subclassed from it in order for HBase to do the right thing, 
but that is already baked into the code in many places.

> Coprocessors: Flag the presence of coprocessors in logged exceptions
> --------------------------------------------------------------------
>
>                 Key: HBASE-4014
>                 URL: https://issues.apache.org/jira/browse/HBASE-4014
>             Project: HBase
>          Issue Type: Improvement
>          Components: coprocessors
>            Reporter: Andrew Purtell
>            Assignee: Eugene Koontz
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4014.patch
>
>
> For some initial triage of bug reports for core versus for deployments with 
> loaded coprocessors, we need something like the Linux kernel's taint flag, 
> and list of linked in modules that show up in the output of every OOPS, to 
> appear above or below exceptions that appear in the logs.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to