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

Anoop Sam John commented on HBASE-11423:
----------------------------------------

I think MultiRowMutationProcessor and the HRegion#batchMutate() methods should 
work similar way wrt CPs.

But that is not the case now.
eg:
preProcess() when processing a Mutation - The CP hook can say bypass() the 
actual op.  In case of HRegion#batchMutate() if this happens for a Mutation, 
that mutation wont continue with apply to memstore, waledit etc.  And the other 
mutations will continue with normal steps.
But in case of MultiRowMutationProcessor 
even if the pre hook bypass a Mutation, still that will go on and apply to 
memstore.  Only the pre calls for the remaining Mutations are bypassed.
{code}
public void preProcess(HRegion region, WALEdit walEdit) throws IOException {
    RegionCoprocessorHost coprocessorHost = region.getCoprocessorHost();
    if (coprocessorHost != null) {
      for (Mutation m : mutations) {
        if (m instanceof Put) {
          if (coprocessorHost.prePut((Put) m, walEdit, m.getDurability())) {
            // by pass everything
            return;
          }
        } else if (m instanceof Delete) {
          Delete d = (Delete) m;
          region.prepareDelete(d);
          if (coprocessorHost.preDelete(d, walEdit, d.getDurability())) {
            // by pass everything
            return;
          }
        }
      }
    }
  }
{code}

IMO this is a bug with MultiRowMutationProcessor and should be handled in 
another jira.  Thoughts?

> Visibility label and per cell ACL feature not working with HTable#mutateRow() 
> and MultiRowMutationEndpoint
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-11423
>                 URL: https://issues.apache.org/jira/browse/HBASE-11423
>             Project: HBase
>          Issue Type: Bug
>          Components: Coprocessors, security
>    Affects Versions: 0.98.0
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>            Priority: Blocker
>             Fix For: 0.99.0, 1.0.0, 0.98.4
>
>         Attachments: HBASE-11423.patch
>
>
> This is because pre/postBatchMutate() APIs are not getting called from 
> HRegion#processRowsWithLocks()



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to