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

Andrew Purtell commented on PHOENIX-3892:
-----------------------------------------

bq. Remove the single hooks and always only call batch hooks (with a default 
wrapper for the single hooks).

Neither removing single hooks nor removing the batch hooks can be done without 
consequence that can't be addressed with wrappers or default methods. We are 
here because already we tried to make multi backwards compatible with 
coprocessors that only implemented single hooks (at the time). We can propose 
breaking the world. If so then we decide how best to break it. 

As alternative:

bq. Allow some state to be passed per operation.

We can change the upcall method signatures independent of coprocessor API 
signatures. Should be possible to introduce a per operation context object, 
pass it through as a parameter, have the coprocessorhost insert a reference to 
this into the upcall context (ObserverContext), and then the coprocessor can 
optionally take advantage of it. We would need to introduce an additional 
getter-setter pair to ObserverContext. 

> Allow regionobserver to optionally skip postPut/postDelete when 
> postBatchMutate was called
> ------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3892
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3892
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>
> Right now a RegionObserver can only statically implement one or the other. In 
> scenarios where we need to work sometimes on the single postPut and 
> postDelete hooks and sometimes on the batchMutate hooks, there is currently 
> no place to convey this information to the single hooks. I.e. the work has 
> been done in the batch, skip the single hooks.
> There are various solutions:
> 1. Allow some state to be passed _per operation_.
> 2. Remove the single hooks and always only call batch hooks (with a default 
> wrapper for the single hooks).
> 3. more?
> [~apurtell], what we had discussed a few days back.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to