You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/11 23:29:00 UTC

[jira] [Resolved] (HBASE-5827) [Coprocessors] Observer notifications on exceptions

     [ https://issues.apache.org/jira/browse/HBASE-5827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kyle Purtell resolved HBASE-5827.
----------------------------------------
    Resolution: Won't Fix

> [Coprocessors] Observer notifications on exceptions
> ---------------------------------------------------
>
>                 Key: HBASE-5827
>                 URL: https://issues.apache.org/jira/browse/HBASE-5827
>             Project: HBase
>          Issue Type: Improvement
>          Components: Coprocessors
>            Reporter: Andrew Kyle Purtell
>            Priority: Major
>
> Benjamin Busjaeger wrote on dev@:
> {quote}
> Is there a reason that RegionObservers are not notified when a get/put/delete fails? Suppose I maintain some (transient) state in my Coprocessor that is created during preGet and discarded during postGet. If the get fails, postGet is not invoked, so I cannot remove the state.
> If there is a good reason, is there any other way to achieve the same thing? If not, would  it be possible to add something the snippet below to the code base?
> {code}
>     // pre-get CP hook
>     if (withCoprocessor && (coprocessorHost != null)) {
>       if (coprocessorHost.preGet(get, results)) {
>         return results;
>       }
>     }
> +    try{
>     ...
> +    } catch (Throwable t) {
> +        // failed-get CP hook
> +        if (withCoprocessor && (coprocessorHost != null)) {
> +          coprocessorHost.failedGet(get, results);
> +        }
> +        rethrow t;
> +    }
>     // post-get CP hook
>     if (withCoprocessor && (coprocessorHost != null)) {
>       coprocessorHost.postGet(get, results);
>     }
> {code}
> {quote}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)